[evolution-data-server/camel-socks-proxy] Oops, fix endianness of port numbers



commit 264e17a212ddb98d85f6f4c278b16d19ea30da5c
Author: Federico Mena Quintero <federico novell com>
Date:   Fri Jul 23 15:22:15 2010 -0500

    Oops, fix endianness of port numbers
    
    ai_addr.sin_port and sin6_port are in network byte order...
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 camel/camel-tcp-stream-raw.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/camel/camel-tcp-stream-raw.c b/camel/camel-tcp-stream-raw.c
index 0df4a2c..4e3711a 100644
--- a/camel/camel-tcp-stream-raw.c
+++ b/camel/camel-tcp-stream-raw.c
@@ -829,6 +829,8 @@ resolve_port (const char *service, gint fallback_port, CamelException *ex)
 		}
 
 		camel_freeaddrinfo (ai);
+
+		port = g_ntohs (port);
 	}
 
 	return port;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]