diff options
-rw-r--r-- | TAO/tao/IIOP_ORB.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/IIOP_Object.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.cpp | 26 | ||||
-rw-r--r-- | ace/INET_Addr.h | 5 |
4 files changed, 23 insertions, 20 deletions
diff --git a/TAO/tao/IIOP_ORB.cpp b/TAO/tao/IIOP_ORB.cpp index 6897f7910d6..af30ef9f553 100644 --- a/TAO/tao/IIOP_ORB.cpp +++ b/TAO/tao/IIOP_ORB.cpp @@ -112,12 +112,14 @@ IIOP_ORB::object_to_string (CORBA::Object_ptr obj, 1 /* zero terminator */); CORBA::String buf = CORBA::string_alloc (buflen); - ACE_OS::sprintf (buf, "%s%c.%c//%s:%d/%s", iiop_prefix, + ACE_OS::sprintf (buf, + "%s%c.%c//%s:%d/%s", + iiop_prefix, digits [iiopobj->profile.iiop_version.major], digits [iiopobj->profile.iiop_version.minor], - iiopobj->profile.host, iiopobj->profile.port, + iiopobj->profile.host, + iiopobj->profile.port, key.in ()); - return buf; } } diff --git a/TAO/tao/IIOP_Object.cpp b/TAO/tao/IIOP_Object.cpp index fce2cc8e8d7..3942f0e7d4b 100644 --- a/TAO/tao/IIOP_Object.cpp +++ b/TAO/tao/IIOP_Object.cpp @@ -133,7 +133,7 @@ IIOP::Profile::set (const ACE_INET_Addr &addr, { // Special case. char temphost[MAXHOSTNAMELEN + 1]; - if (addr.get_host_name (temphost, sizeof(temphost)) != 0) + if (addr.get_host_name (temphost, sizeof temphost) != 0) return -1; else return this->set (temphost, @@ -164,7 +164,7 @@ IIOP::Profile::set (const ACE_INET_Addr &addr, { // Special case. char temphost[MAXHOSTNAMELEN + 1]; - if (addr.get_host_name (temphost, sizeof(temphost)) != 0) + if (addr.get_host_name (temphost, sizeof temphost) != 0) return -1; else return this->set (temphost, diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index 7c8243a0db4..ae389597ae8 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -98,7 +98,7 @@ TAO_Default_Reactor::~TAO_Default_Reactor (void) #define quote(x) #x int -TAO_ORB_Core::init (int& argc, char** argv) +TAO_ORB_Core::init (int &argc, char *argv[]) { // Right now, this code expects to begin parsing in argv[1] rather // than argv[0]. I don't think that's wise. I think we need to @@ -417,9 +417,11 @@ TAO_ORB_Core::init (int& argc, char** argv) if (ACE_OS::strlen (host) == 0) { char buffer[MAXHOSTNAMELEN + 1]; - if (rendezvous.get_host_name (buffer, sizeof (buffer)) != 0) + if (rendezvous.get_host_name (buffer, + sizeof (buffer)) != 0) ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) TAO_ORB_Core::init failed to resolve local host %p.\n"), -1); + "(%P|%t) TAO_ORB_Core::init failed to resolve local host %p.\n"), + -1); host = CORBA::string_dup (buffer); } @@ -573,7 +575,7 @@ TAO_ORB_Core::preconnect (const char* the_preconnections) *sep = '\0'; tport = sep + 1; - dest.set (atoi(tport), thost); + dest.set (ACE_OS::atoi (tport), thost); // Try to establish the connection handler = 0; @@ -583,17 +585,15 @@ TAO_ORB_Core::preconnect (const char* the_preconnections) handlers.push (handler); } else - { - ACE_ERROR ((LM_ERROR, - "(%P|%t) Unable to preconnect to host '%s', port %d.\n", - dest.get_host_name (), dest.get_port_number ())); - } + ACE_ERROR ((LM_ERROR, + "(%P|%t) Unable to preconnect to host '%s', port %d.\n", + dest.get_host_name (), + dest.get_port_number ())); } else - { - ACE_ERROR ((LM_ERROR, - "(%P|%t) Yow! Couldn't find a ':' separator in '%s' spec.\n", where)); - } + ACE_ERROR ((LM_ERROR, + "(%P|%t) Yow! Couldn't find a ':' separator in '%s' spec.\n", + where)); } // Walk the stack of handlers and mark each one as idle now. diff --git a/ace/INET_Addr.h b/ace/INET_Addr.h index b515b186d65..1bab1d1d17a 100644 --- a/ace/INET_Addr.h +++ b/ace/INET_Addr.h @@ -130,7 +130,8 @@ public: u_short get_port_number (void) const; // Return the port number, converting it into host byte order. - int get_host_name (ASYS_TCHAR hostname[], size_t hostnamelen) const; + int get_host_name (ASYS_TCHAR hostname[], + size_t hostnamelen) const; // Return the character representation of the name of the host, // storing it in the <hostname> (which is assumed to be // <hostnamelen> bytes long). This version is reentrant. @@ -141,7 +142,7 @@ public: // area). const char *get_host_addr (void) const; - // Return the dotted Internet address. + // Return the "dotted decimal" Internet address. ACE_UINT32 get_ip_address (void) const; // Return the 4-byte IP address, converting it into host byte |