[evolution-data-server/gnome-2-26] 2009-05-06 Jeff Cai <jeff cai sun com>



commit 47872fca0725ef84932bfc4302c947bb5941db56
Author: Jeff Cai <jeff cai sun com>
Date:   Wed May 6 21:49:56 2009 +0800

    2009-05-06  Jeff Cai <jeff cai sun com>
    
        ** Fix for bug #581420
    
        * camel-net-utils.c: (cs_getaddrinfo):
        On Solaris, the service name 'http' or 'https' is not defined. Use
        the port as the service name directly.
---
 camel/ChangeLog         |    8 ++++++++
 camel/camel-net-utils.c |    9 +++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/camel/ChangeLog b/camel/ChangeLog
index a341253..ec1760d 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-06  Jeff Cai <jeff cai sun com>
+
+	** Fix for bug #581420
+
+	* camel-net-utils.c: (cs_getaddrinfo):
+	On Solaris, the service name 'http' or 'https' is not defined. Use
+	the port as the service name directly.
+
 2009-04-15  Sergio Villar Senin  <svillar igalia com>
 
 	** Fix for bug #578823 â?? invalid condition
diff --git a/camel/camel-net-utils.c b/camel/camel-net-utils.c
index 1533bdf..2c4b170 100644
--- a/camel/camel-net-utils.c
+++ b/camel/camel-net-utils.c
@@ -642,6 +642,15 @@ cs_getaddrinfo(void *data)
 	struct _addrinfo_msg *info = data;
 
 	info->result = getaddrinfo(info->name, info->service, info->hints, info->res);
+
+    /* On Solaris, the service name 'http' or 'https' is not defined. 
+       Use the port as the service name directly. */
+	if (info->result && info->service) {
+		if (strcmp (info->service, "http") == 0)
+			info->result = getaddrinfo(info->name, "80", info->hints, info->res);
+		else if (strcmp (info->service, "https") == 0)
+			info->result = getaddrinfo(info->name, "443", info->hints, info->res);
+	}
 	
 	if (info->cancelled) {
 		cs_freeinfo(info);



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