summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/AV/FlowSpec_Entry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/AV/FlowSpec_Entry.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/FlowSpec_Entry.cpp35
1 files changed, 17 insertions, 18 deletions
diff --git a/TAO/orbsvcs/orbsvcs/AV/FlowSpec_Entry.cpp b/TAO/orbsvcs/orbsvcs/AV/FlowSpec_Entry.cpp
index 18ebfe4e49d..8e9913ab68f 100644
--- a/TAO/orbsvcs/orbsvcs/AV/FlowSpec_Entry.cpp
+++ b/TAO/orbsvcs/orbsvcs/AV/FlowSpec_Entry.cpp
@@ -4,19 +4,17 @@
// TAO_FlowSpec_Entry
//------------------------------------------------------------
-#include "orbsvcs/AV/FlowSpec_Entry.h"
-#include "orbsvcs/AV/Protocol_Factory.h"
+#include "FlowSpec_Entry.h"
+#include "Protocol_Factory.h"
#include "tao/debug.h"
#include "ace/OS_NS_strings.h"
#if !defined (__ACE_INLINE__)
-#include "orbsvcs/AV/FlowSpec_Entry.i"
+#include "FlowSpec_Entry.i"
#endif /* __ACE_INLINE__ */
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
// constructor.
TAO_FlowSpec_Entry::TAO_FlowSpec_Entry (void)
:address_ (0),
@@ -206,7 +204,7 @@ TAO_FlowSpec_Entry::set_protocol (void)
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "TAO_FlowSpec_Entry::set_protocol address is not 0\n"));
ACE_INET_Addr *inet_addr = dynamic_cast<ACE_INET_Addr*> (this->address_);
- char buf[BUFSIZ];
+ ACE_TCHAR buf[BUFSIZ];
inet_addr->addr_to_string (buf,BUFSIZ);
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,"TAO_FlowSpec_Entry::set_protocol:%s %x\n",buf, inet_addr->get_ip_address ()));
@@ -381,7 +379,7 @@ TAO_FlowSpec_Entry::parse_address (const char *address,
}
}
- short control_port = static_cast<short> (ACE_OS::atoi(port_tokenizer[0])) + 1;
+ short control_port = ACE_OS::atoi(port_tokenizer[0]) + 1;
char control_port_str[6];
sprintf (control_port_str, "%d", control_port);
@@ -470,16 +468,19 @@ TAO_FlowSpec_Entry::get_local_addr_str (void)
{
case AF_INET:
{
- char *buf;
+ ACE_TCHAR *buf;
ACE_NEW_RETURN (buf,
- char [BUFSIZ],
+ ACE_TCHAR [BUFSIZ],
0);
ACE_INET_Addr *inet_addr = dynamic_cast<ACE_INET_Addr *> (this->local_addr_);
inet_addr->addr_to_string (buf,BUFSIZ);
+#if defined(ACE_USES_WCHAR)
+ return ACE_TEXT_TO_CHAR_OUT(buf);
+#else
ACE_CString cstring (buf, 0, 0);
-
return cstring.rep ();
+#endif
}
default:
ACE_ERROR_RETURN ((LM_ERROR,"Address family not supported"),0);
@@ -597,7 +598,7 @@ TAO_Forward_FlowSpec_Entry::parse (const char *flowSpec_entry)
this->delete_peer_addr_ = true;
this->peer_addr_ = addr;
- char buf [BUFSIZ];
+ ACE_TCHAR buf [BUFSIZ];
addr->addr_to_string (buf, BUFSIZ);
ACE_DEBUG ((LM_DEBUG,
"Peer Address %s \n",
@@ -637,7 +638,7 @@ TAO_Forward_FlowSpec_Entry::entry_to_string (void)
if (this->flowname_.length() == 0)
return "";
- char address [BUFSIZ];
+ ACE_TCHAR address [BUFSIZ];
ACE_CString address_str;
ACE_CString peer_address_str;
@@ -664,7 +665,7 @@ TAO_Forward_FlowSpec_Entry::entry_to_string (void)
default:
break;
}
- ACE_CString cstring (address);
+ ACE_CString cstring (ACE_TEXT_TO_CHAR_IN(address));
address_str = this->carrier_protocol_;
address_str += "=";
@@ -749,7 +750,7 @@ TAO_Forward_FlowSpec_Entry::entry_to_string (void)
break;
}
- ACE_CString cstring (address);
+ ACE_CString cstring (ACE_TEXT_TO_CHAR_IN(address));
//peer_address_str = this->carrier_protocol_;
//peer_address_str += "=";
@@ -924,7 +925,7 @@ TAO_Reverse_FlowSpec_Entry::entry_to_string (void)
if (this->flowname_.length() == 0)
return "";
- char address [BUFSIZ];
+ ACE_TCHAR address [BUFSIZ];
ACE_CString address_str;
if (this->address_ != 0)
{
@@ -946,7 +947,7 @@ TAO_Reverse_FlowSpec_Entry::entry_to_string (void)
default:
break;
}
- ACE_CString cstring (address);
+ ACE_CString cstring (ACE_TEXT_TO_CHAR_IN(address));
address_str = this->carrier_protocol_;
address_str += "=";
@@ -1014,5 +1015,3 @@ TAO_Reverse_FlowSpec_Entry::entry_to_string (void)
if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"Reverse entry_to_string: entry = %s\n",this->entry_.c_str() ));
return this->entry_.c_str();
}
-
-TAO_END_VERSIONED_NAMESPACE_DECL