summaryrefslogtreecommitdiff
path: root/srclib/apr/network_io/os2
diff options
context:
space:
mode:
Diffstat (limited to 'srclib/apr/network_io/os2')
-rw-r--r--srclib/apr/network_io/os2/os2calls.c12
-rw-r--r--srclib/apr/network_io/os2/sendrecv.c12
-rw-r--r--srclib/apr/network_io/os2/sendrecv_udp.c12
-rw-r--r--srclib/apr/network_io/os2/sockets.c18
-rw-r--r--srclib/apr/network_io/os2/sockopt.c12
5 files changed, 36 insertions, 30 deletions
diff --git a/srclib/apr/network_io/os2/os2calls.c b/srclib/apr/network_io/os2/os2calls.c
index ef204ca7..6bf1fcd0 100644
--- a/srclib/apr/network_io/os2/os2calls.c
+++ b/srclib/apr/network_io/os2/os2calls.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr/network_io/os2/sendrecv.c b/srclib/apr/network_io/os2/sendrecv.c
index 42c057d4..839ff3f8 100644
--- a/srclib/apr/network_io/os2/sendrecv.c
+++ b/srclib/apr/network_io/os2/sendrecv.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr/network_io/os2/sendrecv_udp.c b/srclib/apr/network_io/os2/sendrecv_udp.c
index 7a79e715..c0dcd856 100644
--- a/srclib/apr/network_io/os2/sendrecv_udp.c
+++ b/srclib/apr/network_io/os2/sendrecv_udp.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr/network_io/os2/sockets.c b/srclib/apr/network_io/os2/sockets.c
index f1c00b5b..bb951e4c 100644
--- a/srclib/apr/network_io/os2/sockets.c
+++ b/srclib/apr/network_io/os2/sockets.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -62,9 +62,11 @@ static void alloc_socket(apr_socket_t **new, apr_pool_t *p)
(*new)->local_addr = (apr_sockaddr_t *)apr_pcalloc((*new)->pool,
sizeof(apr_sockaddr_t));
(*new)->local_addr->pool = p;
+
(*new)->remote_addr = (apr_sockaddr_t *)apr_pcalloc((*new)->pool,
sizeof(apr_sockaddr_t));
(*new)->remote_addr->pool = p;
+ (*new)->remote_addr_unknown = 1;
/* Create a pollset with room for one descriptor. */
/* ### check return codes */
@@ -140,6 +142,10 @@ APR_DECLARE(apr_status_t) apr_socket_bind(apr_socket_t *sock,
return APR_OS2_STATUS(sock_errno());
else {
sock->local_addr = sa;
+ /* XXX IPv6 - this assumes sin_port and sin6_port at same offset */
+ if (sock->local_addr->sa.sin.sin_port == 0) { /* no need for ntohs() when comparing w/ 0 */
+ sock->local_port_unknown = 1; /* kernel got us an ephemeral port */
+ }
return APR_SUCCESS;
}
}
diff --git a/srclib/apr/network_io/os2/sockopt.c b/srclib/apr/network_io/os2/sockopt.c
index 5f8a7037..101a952d 100644
--- a/srclib/apr/network_io/os2/sockopt.c
+++ b/srclib/apr/network_io/os2/sockopt.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*