summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-04-12 20:55:28 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-04-12 20:55:28 +0000
commit4539e39bde44ad35ab9cf6873d42ea0b50adb105 (patch)
tree241d53508af8495f32a71c19d525f2ea68aaf08b
parentcd2603aa94088dff1b9327a2bdd811828efdca57 (diff)
downloadATCD-4539e39bde44ad35ab9cf6873d42ea0b50adb105.tar.gz
Merged Main trunk changes.
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Repository.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/Repository.cpp b/TAO/orbsvcs/ImplRepo_Service/Repository.cpp
index 37b9d4f73fe..18879fcf07b 100644
--- a/TAO/orbsvcs/ImplRepo_Service/Repository.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/Repository.cpp
@@ -69,17 +69,18 @@ int
Repository::resolve (const char *key, Repository::Record &rec)
{
char *value = 0, *type = 0; // Temp variables needed for resolve
+ char *lasts = 0; // For strtok_r
int retval = this->repository_.resolve (key, value, type);
if (retval == 0)
{
// +1 to get rid of the space
- rec.comm_line = ACE::strnew (ACE_OS::strtok (value, "\n") + 1);
- rec.env = ACE::strnew (ACE_OS::strtok (NULL, "\n") + 1);
- rec.wdir = ACE::strnew (ACE_OS::strtok (NULL, "\n") + 1);
- rec.host = ACE::strnew (ACE_OS::strtok (NULL, "\n") + 1);
- ::sscanf (ACE_OS::strtok (NULL, "\n"), "%hu", &rec.port);
- rec.ping_ior = ACE::strnew (ACE_OS::strtok (NULL, "\n") + 1);
+ rec.comm_line = ACE::strnew (ACE_OS::strtok_r (value, "\n", &lasts) + 1);
+ rec.env = ACE::strnew (ACE_OS::strtok_r (NULL, "\n", &lasts) + 1);
+ rec.wdir = ACE::strnew (ACE_OS::strtok_r (NULL, "\n", &lasts) + 1);
+ rec.host = ACE::strnew (ACE_OS::strtok_r (NULL, "\n", &lasts) + 1);
+ ::sscanf (ACE_OS::strtok_r (NULL, "\n", &lasts), "%hu", &rec.port);
+ rec.ping_ior = ACE::strnew (ACE_OS::strtok_r (NULL, "\n", &lasts) + 1);
}
else
{