ORBit2 r2089 - in trunk: . linc2 linc2/src src/orb/orb-core



Author: jcolding
Date: Tue Sep 16 12:54:31 2008
New Revision: 2089
URL: http://svn.gnome.org/viewvc/ORBit2?rev=2089&view=rev

Log:
Fixes bugs #538388 and #552323

Modified:
   trunk/ChangeLog
   trunk/linc2/ChangeLog
   trunk/linc2/src/linc-protocols.c
   trunk/linc2/src/linc-server.c
   trunk/src/orb/orb-core/corba-orb.c

Modified: trunk/linc2/src/linc-protocols.c
==============================================================================
--- trunk/linc2/src/linc-protocols.c	(original)
+++ trunk/linc2/src/linc-protocols.c	Tue Sep 16 12:54:31 2008
@@ -870,9 +870,8 @@
 	if (ntohl (sa_in->sin_addr.s_addr) != INADDR_ANY) {
 		host = gethostbyaddr ((char *)&sa_in->sin_addr, 
                                       sizeof (struct in_addr), AF_INET);
-		if (!host)
-			return FALSE;
-		hname = host->h_name;
+		if (host)
+			hname = host->h_name;
 	}
 #endif
 	return link_protocol_get_sockinfo_ipv46 (hname, sa_in->sin_port, 
@@ -931,16 +930,12 @@
 	if (memcmp (&sa_in6->sin6_addr, &in6addr_any, sizeof (struct in6_addr))) {
 
 #ifdef HAVE_GETNAMEINFO
-                if (getnameinfo((struct sockaddr *)sa_in6, sizeof(*sa_in6), hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD))
-			return FALSE;
-		else
+                if (!getnameinfo((struct sockaddr *)sa_in6, sizeof(*sa_in6), hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD))
 			hname = hbuf;
 	}
 #else
 		host = gethostbyaddr ((char *)&sa_in6->sin6_addr,
 				      sizeof (struct in6_addr), AF_INET6);
-		if (!host)
-			return FALSE;
 		if (host)
 			hname = host->h_name;
 	}

Modified: trunk/linc2/src/linc-server.c
==============================================================================
--- trunk/linc2/src/linc-server.c	(original)
+++ trunk/linc2/src/linc-server.c	Tue Sep 16 12:54:31 2008
@@ -332,7 +332,7 @@
 	else
 		local_host = link_get_local_hostname ();
 
- address_in_use:
+address_in_use:
 
 	saddr = link_protocol_get_sockaddr (
 		proto, local_host, local_serv_info, &saddr_len);

Modified: trunk/src/orb/orb-core/corba-orb.c
==============================================================================
--- trunk/src/orb/orb-core/corba-orb.c	(original)
+++ trunk/src/orb/orb-core/corba-orb.c	Tue Sep 16 12:54:31 2008
@@ -106,6 +106,11 @@
 		} while (0);
 	}
 		    
+	if (!orbit_ipname)
+		orbit_ipname = link_get_local_hostname();
+	else
+		link_set_local_hostname(orbit_ipname);
+
 	for (info = link_protocol_all (); info->name; info++) {
 		GIOPServer           *server;
 
@@ -1451,7 +1456,7 @@
 	{ "ORBNamingIOR",       ORBIT_OPTION_STRING,  &orbit_naming_ref},
 
 	{ "ORBRootPOAIOR",      ORBIT_OPTION_STRING,  NULL }, /* FIXME: huh?          */
- 	{ "ORBIIOPIPName",      ORBIT_OPTION_STRING,  &orbit_ipname },
+ 	{ "ORBIIOPIPName",      ORBIT_OPTION_STRING,  &orbit_ipname }, /* Will always take precedence over ORBNetID */
  	{ "ORBIIOPIPSock",      ORBIT_OPTION_STRING,  &orbit_ipsock },
 	{ "ORBInitialMsgLimit", ORBIT_OPTION_INT,     &orbit_initial_recv_limit },
 	{ "ORBLocalOnly",       ORBIT_OPTION_BOOLEAN, &orbit_local_only },



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