diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2008-10-07 08:02:58 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2008-10-07 08:02:58 +0000 |
commit | 3ca740a0c6392a7355651bb8794e123f590e5041 (patch) | |
tree | b583aa95a4c853d94a273aba120ba4cab244a824 /TAO | |
parent | aea5a49a468561e28a6a28d519d542bfdf977097 (diff) | |
download | ATCD-3ca740a0c6392a7355651bb8794e123f590e5041.tar.gz |
Tue Oct 7 08:02:45 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO')
14 files changed, 55 insertions, 37 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 47e9363a910..afd844b361c 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,20 @@ +Tue Oct 7 08:02:45 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> + + * orbsvcs/orbsvcs/FtRtEvent/EventChannel/AMI_Primary_Replication_Strategy.cpp + * orbsvcs/orbsvcs/FtRtEvent/EventChannel/Basic_Replication_Strategy.cpp + * orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector.cpp + * orbsvcs/orbsvcs/FtRtEvent/EventChannel/ForwardCtrlServerInterceptor.cpp + * orbsvcs/orbsvcs/FtRtEvent/Utils/Log.cpp + * orbsvcs/orbsvcs/FtRtEvent/Utils/Log.h + * orbsvcs/orbsvcs/FtRtEvent/Utils/Log.inl + * orbsvcs/orbsvcs/FtRtEvent/Utils/UUID.cpp + * orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp + * orbsvcs/orbsvcs/Notify/XML_Saver.cpp + * orbsvcs/orbsvcs/Notify/XML_Saver.h + * orbsvcs/orbsvcs/Notify/XML_Topology_Factory.cpp + * orbsvcs/orbsvcs/Notify/XML_Topology_Factory.h + ACE_TCHAR fixes + Tue Oct 7 07:49:45 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> * orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/AMI_Primary_Replication_Strategy.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/AMI_Primary_Replication_Strategy.cpp index 0e3a3f5aa7b..33811880cec 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/AMI_Primary_Replication_Strategy.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/AMI_Primary_Replication_Strategy.cpp @@ -108,7 +108,7 @@ AMI_Primary_Replication_Strategy::replicate_request( size_t num_backups = backups.length(); if ((size_t)transaction_depth > num_backups) { - TAO_FTRTEC::Log(3, "Throwing FTRT::TransactionDepthTooHigh\n"); + TAO_FTRTEC::Log(3, ACE_TEXT("Throwing FTRT::TransactionDepthTooHigh\n")); throw FTRT::TransactionDepthTooHigh(); } @@ -149,7 +149,7 @@ AMI_Primary_Replication_Strategy::replicate_request( catch (...){ } } - TAO_FTRTEC::Log(3, "Throwing FTRT::TransactionDepthTooHigh\n"); + TAO_FTRTEC::Log(3, ACE_TEXT("Throwing FTRT::TransactionDepthTooHigh\n")); throw FTRT::TransactionDepthTooHigh(); } diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Basic_Replication_Strategy.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Basic_Replication_Strategy.cpp index 69f5e906f1d..4896b1405d5 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Basic_Replication_Strategy.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Basic_Replication_Strategy.cpp @@ -31,7 +31,7 @@ Basic_Replication_Strategy::check_validity(void) { FTRT::SequenceNumber seq_no = Request_Context_Repository().get_sequence_number(); - TAO_FTRTEC::Log(1 , "check_validity : sequence no = %d\n", sequence_num_); + TAO_FTRTEC::Log(1 , ACE_TEXT("check_validity : sequence no = %d\n"), sequence_num_); if (this->sequence_num_ == 0) { // this is the first set_update received from the primary @@ -44,7 +44,7 @@ Basic_Replication_Strategy::check_validity(void) // client_interceptor_->sequence_num_--; FTRT::OutOfSequence exception; exception.current = this->sequence_num_; - TAO_FTRTEC::Log(3, "Throwing FTRT::OutOfSequence (old sequence_num_ = %d)\n", this->sequence_num_); + TAO_FTRTEC::Log(3, ACE_TEXT("Throwing FTRT::OutOfSequence (old sequence_num_ = %d)\n"), this->sequence_num_); throw FTRT::OutOfSequence(exception); } else @@ -85,7 +85,7 @@ Basic_Replication_Strategy::replicate_request( if (info_publisher->is_primary()) this->sequence_num_++; - TAO_FTRTEC::Log(1, "replicate_request : sequence no = %d\n", sequence_num_); + TAO_FTRTEC::Log(1, ACE_TEXT("replicate_request : sequence no = %d\n"), sequence_num_); Request_Context_Repository().set_sequence_number(sequence_num_); Request_Context_Repository().set_transaction_depth(transaction_depth-1); @@ -102,7 +102,7 @@ Basic_Replication_Strategy::replicate_request( } } else if (transaction_depth > 1) { - TAO_FTRTEC::Log(3, "Throwing FTRT::TransactionDepthTooHigh\n"); + TAO_FTRTEC::Log(3, ACE_TEXT("Throwing FTRT::TransactionDepthTooHigh\n")); throw FTRT::TransactionDepthTooHigh(); } } diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector.cpp index d4eb63a61b4..7e225602e4b 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector.cpp @@ -67,7 +67,7 @@ void Fault_Detector::set_listener(TAO_FTEC_Fault_Listener* listener) listener_ = listener; } -int Fault_Detector::parse_conf(int , char** ) +int Fault_Detector::parse_conf(int , ACE_TCHAR** ) { return 0; } diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/ForwardCtrlServerInterceptor.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/ForwardCtrlServerInterceptor.cpp index dda1acb6b21..db1ade61aad 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/ForwardCtrlServerInterceptor.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/ForwardCtrlServerInterceptor.cpp @@ -152,7 +152,7 @@ void ForwardCtrlServerInterceptor::send_reply (PortableInterceptor::ServerReques // pass a new IOGR if the client use an outdated version IOGR_Maker* maker = IOGR_Maker::instance(); - TAO_FTRTEC::Log(3, "Current GROUP Version = %d, received version = %d\n", + TAO_FTRTEC::Log(3, ACE_TEXT("Current GROUP Version = %d, received version = %d\n"), maker->get_ref_version(), version); if (version < maker->get_ref_version()) { diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.cpp index 6319f696946..44476a3fc23 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.cpp @@ -17,7 +17,7 @@ unsigned int Log::log_level_; if (log_level_ >= log_level) { va_list p; va_start(p, format); - char str[1024]; + ACE_TCHAR str[1024]; ACE_OS::vsprintf(str, format, p); ACE_DEBUG((LM_DEBUG, str)); va_end(p); diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.h b/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.h index 71b95a8a28e..54909fb4e36 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.h +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.h @@ -31,7 +31,7 @@ namespace TAO_FTRTEC { Log (unsigned int log_level, const ACE_TCHAR* format, ...); static void level(unsigned int log_level); static unsigned int level(); - static void hexdump(unsigned int log_level, const char* buf, size_t len, const char* msg); + static void hexdump(unsigned int log_level, const char* buf, size_t len, const ACE_TCHAR* msg); private: friend class Trace; static unsigned log_level_; diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.inl b/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.inl index 120a88f6557..f8ebf7863c9 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.inl +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.inl @@ -19,7 +19,7 @@ namespace TAO_FTRTEC { } ACE_INLINE - void Log::hexdump(unsigned int level, const char* buf, size_t len, const char* msg) + void Log::hexdump(unsigned int level, const char* buf, size_t len, const ACE_TCHAR* msg) { if (Log::log_level_ >= level) ACE_HEX_DUMP((LM_DEBUG, buf, len, msg)); @@ -42,7 +42,7 @@ namespace TAO_FTRTEC { } ACE_INLINE - void Log::hexdump(unsigned int, const char*, size_t, const char*) + void Log::hexdump(unsigned int, const char*, size_t, const ACE_TCHAR*) { } #endif diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/UUID.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/UUID.cpp index 9f2bff6bbfe..20ff2119ba2 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/UUID.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/UUID.cpp @@ -49,14 +49,14 @@ static const char *seperators = "----"; /** * construct an UUID from the string representation */ -UUID::UUID (const ACE_TCHAR *string_rep) +UUID::UUID (const ACE_TCHAR *string_rep) { - if (this->from_string(string_rep) == false) + if (this->from_string(ACE_TEXT_ALWAYS_CHAR(string_rep)) == false) rep_.timestamp.hi = 0; } bool -UUID::from_string (const char *string_rep) +UUID::from_string (const char *string_rep) { int offset = 0; diff --git a/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp b/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp index d82ceafe7da..ba7b8a542ba 100644 --- a/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp +++ b/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp @@ -456,7 +456,7 @@ TAO_Hash_LogRecordStore::retrieve (DsLogAdmin::TimeT from_time, { // Decide between forward vs backward retrieval. char constraint[32]; - char uint64_formating[32]; + ACE_TCHAR uint64_formating[32]; #if defined (ACE_LACKS_LONGLONG_T) ACE_OS::sprintf (uint64_formating, diff --git a/TAO/orbsvcs/orbsvcs/Notify/XML_Saver.cpp b/TAO/orbsvcs/orbsvcs/Notify/XML_Saver.cpp index 17589bf00c6..5b7be5a138e 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/XML_Saver.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/XML_Saver.cpp @@ -33,9 +33,9 @@ namespace TAO_Notify } void - XML_Saver::backup_file_name (char * file_path, size_t nfile) + XML_Saver::backup_file_name (ACE_TCHAR * file_path, size_t nfile) { - ACE_OS::snprintf(file_path, MAXPATHLEN, "%s.%3.3d", + ACE_OS::snprintf(file_path, MAXPATHLEN, ACE_TEXT("%s.%3.3d"), this->base_name_.c_str (), nfile); } @@ -52,13 +52,13 @@ namespace TAO_Notify // delete the oldest backup file (if it exists) size_t nfile = this->backup_count_ - 1; - char old_path [MAXPATHLEN + 1]; + ACE_TCHAR old_path [MAXPATHLEN + 1]; backup_file_name (old_path, nfile); ACE_OS::unlink (old_path); while (nfile != 0) { - char new_path [MAXPATHLEN + 1]; + ACE_TCHAR new_path [MAXPATHLEN + 1]; nfile -= 1; backup_file_name (new_path, nfile); // this may fail, we don't care @@ -66,37 +66,37 @@ namespace TAO_Notify ACE_OS::strcpy (old_path, new_path); } // old_path now contains the name of the backup file - ACE_CString xml_name = this->base_name_; - xml_name += ".xml"; + ACE_TString xml_name = this->base_name_; + xml_name += ACE_TEXT(".xml"); ACE_OS::rename (xml_name.c_str (), old_path); - ACE_CString new_name = this->base_name_; - new_name += ".new"; + ACE_TString new_name = this->base_name_; + new_name += ACE_TEXT(".new"); ACE_OS::rename (new_name.c_str (), xml_name.c_str ()); } this->output_ = 0; } bool - XML_Saver::open(const ACE_CString & base_name, size_t backup_count) + XML_Saver::open(const ACE_TString & base_name, size_t backup_count) { this->base_name_ = base_name; this->backup_count_ = backup_count; - if (base_name == "cout") + if (base_name == ACE_TEXT("cout")) { this->output_ = stdout; this->close_out_ = false; } - else if (base_name == "cerr") + else if (base_name == ACE_TEXT("cerr")) { this->output_ = stderr; this->close_out_ = false; } else { - ACE_CString file_name = base_name; - file_name += ".new"; + ACE_TString file_name = base_name; + file_name += ACE_TEXT(".new"); this->output_ = ACE_OS::fopen (file_name.c_str(), ACE_TEXT("wb")); if (this->output_) { @@ -177,7 +177,8 @@ namespace TAO_Notify ACE_TString tmp(BUF_SIZE); for (size_t idx = 0; idx < attrs.size(); ++idx) { - ACEXML_escape_string(attrs[idx].value, tmp); + ACE_TString valuetmp (ACE_TEXT_CHAR_TO_TCHAR(attrs[idx].value.c_str())); + ACEXML_escape_string(valuetmp, tmp); ACE_OS::fprintf (out, "%s%s%s%s%s", " ", attrs[idx].name.c_str (), "=\"", tmp.c_str(), "\""); } diff --git a/TAO/orbsvcs/orbsvcs/Notify/XML_Saver.h b/TAO/orbsvcs/orbsvcs/Notify/XML_Saver.h index 7b51e25a51a..2771dd3c177 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/XML_Saver.h +++ b/TAO/orbsvcs/orbsvcs/Notify/XML_Saver.h @@ -42,7 +42,7 @@ public: /// Open the output file. /// \param file_name the fully qualified file name /// \return true if successful - bool open (const ACE_CString & file_name, size_t backup_count); + bool open (const ACE_TString & file_name, size_t backup_count); ////////////////////////////////// // Override Topology_Saver methods @@ -58,7 +58,7 @@ public: virtual void close (void); private: - void backup_file_name (char * file_path, size_t nfile); + void backup_file_name (ACE_TCHAR * file_path, size_t nfile); private: /// A stream representing our current output. @@ -66,7 +66,7 @@ private: bool close_out_; /// the name of the output file - ACE_CString base_name_; + ACE_TString base_name_; size_t backup_count_; /// true to enable timestamping diff --git a/TAO/orbsvcs/orbsvcs/Notify/XML_Topology_Factory.cpp b/TAO/orbsvcs/orbsvcs/Notify/XML_Topology_Factory.cpp index 90a389fb904..f3bead86487 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/XML_Topology_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/XML_Topology_Factory.cpp @@ -16,8 +16,8 @@ namespace TAO_Notify const char TOPOLOGY_ID_NAME[] = "TopologyID"; XML_Topology_Factory::XML_Topology_Factory() - : save_base_path_ ("./Notification_Service_Topology") - , load_base_path_ ("./Notification_Service_Topology") + : save_base_path_ (ACE_TEXT("./Notification_Service_Topology")) + , load_base_path_ (ACE_TEXT("./Notification_Service_Topology")) , backup_count_ (2) , timestamp_ (true) { diff --git a/TAO/orbsvcs/orbsvcs/Notify/XML_Topology_Factory.h b/TAO/orbsvcs/orbsvcs/Notify/XML_Topology_Factory.h index b6dc0686d8a..e0921a91927 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/XML_Topology_Factory.h +++ b/TAO/orbsvcs/orbsvcs/Notify/XML_Topology_Factory.h @@ -69,8 +69,8 @@ namespace TAO_Notify virtual int fini (); private: - ACE_CString save_base_path_; - ACE_CString load_base_path_; + ACE_TString save_base_path_; + ACE_TString load_base_path_; size_t backup_count_; bool timestamp_; }; |