summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector_T.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector_T.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector_T.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector_T.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector_T.cpp
index bcf68ca9e98..168e0ed8006 100644
--- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector_T.cpp
+++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector_T.cpp
@@ -4,8 +4,6 @@
#include "ace/INET_Addr.h"
#include "ace/os_include/os_netdb.h"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
template <class ACCEPTOR, class CONNECTOR, class DETECTION_HANDLER>
Fault_Detector_T<ACCEPTOR, CONNECTOR, DETECTION_HANDLER>::Fault_Detector_T()
{
@@ -30,10 +28,16 @@ Fault_Detector_T<ACCEPTOR, CONNECTOR, DETECTION_HANDLER>::init_acceptor()
ACE_DEBUG((LM_DEBUG, "listening at %s:%d\n", listen_addr.get_host_name(),
listen_addr.get_port_number()));
- char* buf = CORBA::string_alloc(MAXHOSTNAMELEN);
+
+ ACE_TCHAR* buf = new ACE_TCHAR[ MAXHOSTNAMELEN + 1 ];
listen_addr.addr_to_string(buf, MAXHOSTNAMELEN, 0);
location_.length(1);
+#if defined (ACE_USES_WCHAR)
+ location_[0].id = ACE::String_Conversion::Convert_Out<char>( buf ).c_str();
+ delete buf;
+#else
location_[0].id = buf;
+#endif
return 0;
}
@@ -61,5 +65,3 @@ Fault_Detector_T<ACCEPTOR, CONNECTOR, DETECTION_HANDLER>::connect(const FTRT::Lo
return result ;
}
-
-TAO_END_VERSIONED_NAMESPACE_DECL