qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject qpid-proton git commit: QPID-548: IPv6 fix for Windows to create socket of correct address family. Patch from Dominic Evans.
Date Wed, 03 Dec 2014 22:08:55 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master e6c6873af -> b4fbb1504


QPID-548: IPv6 fix for Windows to create socket of correct address family.
Patch from Dominic Evans.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/b4fbb150
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/b4fbb150
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/b4fbb150

Branch: refs/heads/master
Commit: b4fbb1504a005d449a7201eed8e5dd8ac6212ef5
Parents: e6c6873
Author: Chuck Rolke <chug@redhat.com>
Authored: Wed Dec 3 17:07:20 2014 -0500
Committer: Chuck Rolke <chug@redhat.com>
Committed: Wed Dec 3 17:07:20 2014 -0500

----------------------------------------------------------------------
 proton-c/src/windows/io.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b4fbb150/proton-c/src/windows/io.c
----------------------------------------------------------------------
diff --git a/proton-c/src/windows/io.c b/proton-c/src/windows/io.c
index 873926c..ec7f95b 100644
--- a/proton-c/src/windows/io.c
+++ b/proton-c/src/windows/io.c
@@ -170,7 +170,7 @@ static void pn_configure_sock(pn_io_t *io, pn_socket_t sock) {
   }
 }
 
-static inline pn_socket_t pni_create_socket();
+static inline pn_socket_t pni_create_socket(int domain);
 
 pn_socket_t pn_listen(pn_io_t *io, const char *host, const char *port)
 {
@@ -181,7 +181,7 @@ pn_socket_t pn_listen(pn_io_t *io, const char *host, const char *port)
     return INVALID_SOCKET;
   }
 
-  pn_socket_t sock = pni_create_socket();
+  pn_socket_t sock = pni_create_socket(addr->ai_family);
   if (sock == INVALID_SOCKET) {
     pni_win32_error(io->error, "pni_create_socket", WSAGetLastError());
     return INVALID_SOCKET;
@@ -235,7 +235,7 @@ pn_socket_t pn_connect(pn_io_t *io, const char *hostarg, const char *port)
     return INVALID_SOCKET;
   }
 
-  pn_socket_t sock = pni_create_socket();
+  pn_socket_t sock = pni_create_socket(addr->ai_family);
   if (sock == INVALID_SOCKET) {
     pni_win32_error(io->error, "proton pni_create_socket", WSAGetLastError());
     freeaddrinfo(addr);
@@ -301,12 +301,12 @@ pn_socket_t pn_accept(pn_io_t *io, pn_socket_t listen_sock, char *name,
size_t s
   }
 }
 
-static inline pn_socket_t pni_create_socket() {
+static inline pn_socket_t pni_create_socket(int domain) {
   struct protoent * pe_tcp = getprotobyname("tcp");
   if (pe_tcp == NULL) {
     return -1;
   }
-  return socket(AF_INET, SOCK_STREAM, pe_tcp->p_proto);
+  return socket(domain, SOCK_STREAM, pe_tcp->p_proto);
 }
 
 ssize_t pn_send(pn_io_t *io, pn_socket_t sockfd, const void *buf, size_t len) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message