From 6bfe3d5596c9bd036c11759bcd7cdfc070ef36ad Mon Sep 17 00:00:00 2001 From: pgontla Date: Thu, 13 Feb 2003 23:32:06 +0000 Subject: ChangeLogTag: Thu Feb 13 15:15:29 2003 Priyanka Gontla --- TAO/ChangeLog | 20 ++++++++++++++++++++ TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp | 9 +-------- TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp | 5 +---- TAO/tao/MCAST_Parser.cpp | 24 ++++++++++++++++-------- 4 files changed, 38 insertions(+), 20 deletions(-) diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 728585f8e3a..0d7c5f2a474 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,23 @@ +Thu Feb 13 15:15:29 2003 Priyanka Gontla + + * tao/MCAST_Parser.cpp (multicast_query): + Modified the diagnostic message that Craig added with the + changelog entry + + Wed Feb 12 00:45:04 UTC 2003 Craig Rodrigues + + to reflect the actual service name instead of being NameService + always. Added a service_name check to print out the NameService + related debugging message if it is indeed NameService. + + * orbsvcs/ImplRepo_Service/tao_imr_i.cpp: + * orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp: + A change which I did a while ago seemed to be missing. Nanbor + applied the relevant fixes for Windows. Removing the ifdefs + around the same code so that even for non-windows, the whole + hostname including the domain is used. + + Thu Feb 13 17:45:35 2003 Balachandran Natarajan * utils/catior/Makefile: Do not build if RTCORBA is turned off. diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp index e7790934528..fb5a1afc6be 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp @@ -945,7 +945,6 @@ ImR_Activator_i::init (ACE_ENV_SINGLE_ARG_DECL) // register this activator (with the name of the hostname where // this instance is being run) with the locator. -#if defined (ACE_WIN32) struct hostent *hinfo = ACE_OS::gethostbyname (hostname); char full_hostname[BUFSIZ]; ACE_OS::strcpy (full_hostname, hinfo->h_name); @@ -954,14 +953,8 @@ ImR_Activator_i::init (ACE_ENV_SINGLE_ARG_DECL) locator->register_activator (full_hostname, imr_obj.in () ACE_ENV_ARG_PARAMETER); -#else - CORBA::ULong reg_act = - locator->register_activator (hostname, - imr_obj.in () - ACE_ENV_ARG_PARAMETER); -#endif /* ACE_WIN32 */ ACE_TRY_CHECK; - + if (reg_act == 1) { ACE_ERROR_RETURN ((LM_ERROR, diff --git a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp index 8dadb284ef3..e5c237f1074 100644 --- a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp @@ -705,13 +705,10 @@ TAO_IMR_Op_Add::run (void) // else use the hostname on which tao_imr is run char hostname[BUFSIZ]; ACE_OS::hostname (hostname, BUFSIZ); -#if defined (ACE_WIN32) + struct hostent *hinfo = ACE_OS::gethostbyname (hostname); startup_options.location = CORBA::string_dup (hinfo->h_name); -#else - startup_options.location = CORBA::string_dup (hostname); -#endif /* ACE_WIN32 */ } ACE_DECLARE_NEW_CORBA_ENV; diff --git a/TAO/tao/MCAST_Parser.cpp b/TAO/tao/MCAST_Parser.cpp index f9f5cab5d78..5ab85188a43 100644 --- a/TAO/tao/MCAST_Parser.cpp +++ b/TAO/tao/MCAST_Parser.cpp @@ -313,15 +313,23 @@ TAO_MCAST_Parser::multicast_query (char *&buf, } } } - if (result == -1) { - ACE_ERROR ((LM_ERROR, ACE_TEXT("\nmulticast discovery of NameService failed.\n") - ACE_TEXT("Specify -m 1 when starting Naming_Service,\n") - ACE_TEXT("or see http://www.theaceorb.com/faq/#115\n") - ACE_TEXT("for using NameService without multicast.\n\n") - )); - } + if (result == -1) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT("\nmulticast discovery of %s failed.\n"), + service_name)); + + if (ACE_OS::strcasecmp (service_name, + "NameService") == 0) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT("Specify -m 1 when starting Naming_Service,\n") + ACE_TEXT("or see http://www.theaceorb.com/faq/#115\n") + ACE_TEXT("for using NameService without multicast.\n\n"))); + } + } } - + // Clean up. stream.close (); dgram.close (); -- cgit v1.2.1