summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfhunleth <fhunleth@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-02-07 19:01:25 +0000
committerfhunleth <fhunleth@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-02-07 19:01:25 +0000
commit92932f26495fe12e67f469464752b97540368e04 (patch)
treec267246331c7269848b06acb5bd433a10fd43f7a
parent7e55c9b2d8e68356dec8b124cfedf89548baa109 (diff)
downloadATCD-92932f26495fe12e67f469464752b97540368e04.tar.gz
ChangeLogTag: Wed Feb 7 12:57:35 2001 Frank Hunleth <fhunleth@cs.wustl.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a7
-rw-r--r--TAO/tao/Acceptor_Registry.cpp18
2 files changed, 17 insertions, 8 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 3b03aba23e9..bb27a691b97 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,10 @@
+Wed Feb 7 12:57:35 2001 Frank Hunleth <fhunleth@cs.wustl.edu>
+
+ * tao/Acceptor_Registry.cpp:
+ Fixed redundant call to strtok_r in open_i when a
+ protocol is specified without an endpoint. This was
+ causing core dumps on Linux platforms.
+
Tue Feb 6 22:39:06 2001 Frank Hunleth <fhunleth@cs.wustl.edu>
* tao/Connection_Cache_Manager.cpp:
diff --git a/TAO/tao/Acceptor_Registry.cpp b/TAO/tao/Acceptor_Registry.cpp
index b157f91620a..94d106a5d29 100644
--- a/TAO/tao/Acceptor_Registry.cpp
+++ b/TAO/tao/Acceptor_Registry.cpp
@@ -498,18 +498,16 @@ TAO_Acceptor_Registry::open_i (TAO_ORB_Core *orb_core,
const char *astr = ACE_OS::strtok_r (addr_str.get (),
",",
&last_addr);
- if (astr == 0)
- astr = "";
// Iterate over the addrs specified in the endpoint.
- for ( ;
- astr != 0;
- astr = ACE_OS::strtok_r (0,
- ",",
- &last_addr))
+ do
{
- ACE_CString address (astr);
+ // For the first time only through the loop, it is
+ // possible for astr to be 0. This indicates that
+ // the user is requesting the default endpoint for
+ // the specified protocol.
+ ACE_CString address (astr == 0 ? "" : astr);
TAO_Acceptor *acceptor =
(*factory)->factory ()->make_acceptor ();
@@ -591,6 +589,10 @@ TAO_Acceptor_Registry::open_i (TAO_ORB_Core *orb_core,
-1);
}
}
+ while ((astr != 0) &&
+ ((astr = ACE_OS::strtok_r (0,
+ ",",
+ &last_addr)) != 0));
return 0;
}