diff options
author | elliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-30 12:31:02 +0000 |
---|---|---|
committer | elliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-30 12:31:02 +0000 |
commit | fdf973a1e9561a5b04b53ccb4f98e929f9e9a3c6 (patch) | |
tree | 0918899fe823d8adb5a86c5db91f4bf8e43a1086 /TAO/tao/MCAST_Parser.cpp | |
parent | 52728a087e8dc453923745ad5d85bb1e15c1ce25 (diff) | |
download | ATCD-fdf973a1e9561a5b04b53ccb4f98e929f9e9a3c6.tar.gz |
ChangeLogTag: Wed Apr 30 07:26:37 2003 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/tao/MCAST_Parser.cpp')
-rw-r--r-- | TAO/tao/MCAST_Parser.cpp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/TAO/tao/MCAST_Parser.cpp b/TAO/tao/MCAST_Parser.cpp index 61d4e7efc13..8bfb0179995 100644 --- a/TAO/tao/MCAST_Parser.cpp +++ b/TAO/tao/MCAST_Parser.cpp @@ -220,7 +220,8 @@ TAO_MCAST_Parser::multicast_query (char *&buf, // The service name string. iovp[2].iov_base = (char *) service_name; - iovp[2].iov_len = ACE_OS::strlen (service_name) + 1; + iovp[2].iov_len = ACE_static_cast (u_long, + ACE_OS::strlen (service_name) + 1); // Send the multicast. result = dgram.send (iovp, @@ -354,14 +355,11 @@ TAO_MCAST_Parser::assign_to_variables (const char * &mcast_name) if (pos_colon1 == 0) { - const char *default_addr = ACE_DEFAULT_MULTICAST_ADDR; - this->mcast_address_ = CORBA::string_alloc (ACE_OS::strlen (default_addr)); - this->mcast_address_ = default_addr; - + const char *default_addr = ACE_DEFAULT_MULTICAST_ADDR; + this->mcast_address_ = default_addr; } else { - this->mcast_address_ = CORBA::string_alloc (pos_colon1); this->mcast_address_ = mcast_name_cstring.substring (0, pos_colon1).c_str (); @@ -404,13 +402,10 @@ TAO_MCAST_Parser::assign_to_variables (const char * &mcast_name) ACE_OS_String::itoa (trial_port, default_port, 10); - this->mcast_port_ = - CORBA::string_alloc (ACE_OS::strlen ((const char *) default_port)); this->mcast_port_ = (const char *) default_port; } else { - this->mcast_port_ = CORBA::string_alloc (pos_colon2); this->mcast_port_ = mcast_name_cstring.substring (0, pos_colon2).c_str (); } @@ -422,7 +417,6 @@ TAO_MCAST_Parser::assign_to_variables (const char * &mcast_name) int pos_colon3 = mcast_name_cstring.find (':', 0); - this->mcast_nic_ = CORBA::string_alloc (pos_colon3); this->mcast_nic_ = mcast_name_cstring.substring (0, pos_colon3).c_str (); @@ -436,13 +430,11 @@ TAO_MCAST_Parser::assign_to_variables (const char * &mcast_name) if (pos_colon4 == 0) { // And, the default TTL to be 1 - const char *default_ttl = "1"; - this->mcast_ttl_ = CORBA::string_alloc (ACE_OS::strlen (default_ttl)); + const char *default_ttl = "1"; this->mcast_ttl_ = default_ttl; } else { - this->mcast_ttl_ = CORBA::string_alloc (pos_colon4); this->mcast_ttl_ = mcast_name_cstring.substring (0, pos_colon4).c_str (); @@ -452,9 +444,6 @@ TAO_MCAST_Parser::assign_to_variables (const char * &mcast_name) mcast_name_cstring.length() - pos_colon4); this->service_name_ = - CORBA::string_alloc (mcast_name_cstring.length ()); - - this->service_name_ = mcast_name_cstring.substring (1, mcast_name_cstring.length() -1).c_str (); |