From 62c90c681f8383a9676251ddc917058bc9292bca Mon Sep 17 00:00:00 2001 From: kitty Date: Sat, 13 Jul 2002 01:33:11 +0000 Subject: ChangeLogTag: Fri Jul 12 20:28:52 2002 Krishnakumar B --- ACEXML/apps/svcconf/Svcconf_Handler.cpp | 27 ++++++++++++++++++--------- ACEXML/apps/svcconf/Svcconf_Handler.i | 16 ++++++++-------- ACEXML/common/URL_Addr.cpp | 16 ++++++++-------- ChangeLog | 13 +++++++++++++ ChangeLogs/ChangeLog-03a | 13 +++++++++++++ 5 files changed, 60 insertions(+), 25 deletions(-) diff --git a/ACEXML/apps/svcconf/Svcconf_Handler.cpp b/ACEXML/apps/svcconf/Svcconf_Handler.cpp index aac67fab5bf..bc691ae2c19 100644 --- a/ACEXML/apps/svcconf/Svcconf_Handler.cpp +++ b/ACEXML/apps/svcconf/Svcconf_Handler.cpp @@ -79,7 +79,7 @@ ACEXML_Svcconf_Handler::endElement (const ACEXML_Char *, if (func == 0) { - xmlenv.exception (new ACEXML_SAXException ("Cannot locator init function\n")); + xmlenv.exception (new ACEXML_SAXException ("Cannot locate init function\n")); return; } symbol = (*func)(&gobbler); // target object created in the loaded DLL. @@ -159,7 +159,7 @@ ACEXML_Svcconf_Handler::endElement (const ACEXML_Char *, active_info->init_params ()) == -1) { xmlenv.exception (new ACEXML_SAXException - ("Fail to initialize dynamic service\n")); + ("Failed to initialize dynamic service\n")); return; } } @@ -303,7 +303,7 @@ ACEXML_Svcconf_Handler::startElement (const ACEXML_Char *, (this->stream_info_.name (), (const ACE_Service_Type **) &this->stream_svc_type_) == -1) { - xmlenv.exception (new ACEXML_SAXException ("Can not find stream\n")); + xmlenv.exception (new ACEXML_SAXException ("Cannot find stream\n")); return; } this->stream_ = this->stream_svc_type_ == 0 @@ -481,27 +481,36 @@ ACEXML_Svcconf_Handler::resolveEntity (const ACEXML_Char *, * Receive notification of a recoverable error. */ void -ACEXML_Svcconf_Handler::error (ACEXML_SAXParseException &, +ACEXML_Svcconf_Handler::error (ACEXML_SAXParseException& ex, ACEXML_Env &) // ACE_THROW_SPEC ((ACEXML_SAXException)) { - // No-op. + ACE_DEBUG ((LM_DEBUG, "%s: line :%d col: %d ", this->getSystemId(), + this->locator_->getLineNumber(), + this->locator_->getColumnNumber())); + ex.print(); } void -ACEXML_Svcconf_Handler::fatalError (ACEXML_SAXParseException &, +ACEXML_Svcconf_Handler::fatalError (ACEXML_SAXParseException& ex, ACEXML_Env &) // ACE_THROW_SPEC ((ACEXML_SAXException)) { - // No-op. + ACE_DEBUG ((LM_DEBUG, "%s: line :%d col: %d ", this->getSystemId(), + this->locator_->getLineNumber(), + this->locator_->getColumnNumber())); + ex.print(); } void -ACEXML_Svcconf_Handler::warning (ACEXML_SAXParseException &, +ACEXML_Svcconf_Handler::warning (ACEXML_SAXParseException& ex, ACEXML_Env &) // ACE_THROW_SPEC ((ACEXML_SAXException)) { - // No-op. + ACE_DEBUG ((LM_DEBUG, "%s: line :%d col: %d ", this->getSystemId(), + this->locator_->getLineNumber(), + this->locator_->getColumnNumber())); + ex.print(); } int diff --git a/ACEXML/apps/svcconf/Svcconf_Handler.i b/ACEXML/apps/svcconf/Svcconf_Handler.i index c78a345e2f6..605dec5f2f7 100644 --- a/ACEXML/apps/svcconf/Svcconf_Handler.i +++ b/ACEXML/apps/svcconf/Svcconf_Handler.i @@ -14,10 +14,10 @@ ACE_Parsed_Info::ACE_Parsed_Info () ACE_INLINE ACE_Parsed_Info::~ACE_Parsed_Info () { - delete this->name_; - delete this->path_; - delete this->init_func_; - delete this->init_params_; + delete[] this->name_; + delete[] this->path_; + delete[] this->init_func_; + delete[] this->init_params_; } ACE_INLINE int @@ -121,13 +121,13 @@ ACE_Parsed_Info::init_params (void) ACE_INLINE void ACE_Parsed_Info::reset (void) { - delete this->name_; + delete[] this->name_; this->name_ = 0; this->service_type_ = -1; - delete this->path_; + delete[] this->path_; this->path_ = 0; - delete this->init_func_; + delete[] this->init_func_; this->init_func_ = 0; - delete this->init_params_; + delete[] this->init_params_; this->init_params_ = 0; } diff --git a/ACEXML/common/URL_Addr.cpp b/ACEXML/common/URL_Addr.cpp index ffc8f6c4632..3a1a36212b6 100644 --- a/ACEXML/common/URL_Addr.cpp +++ b/ACEXML/common/URL_Addr.cpp @@ -83,14 +83,14 @@ ACEXML_URL_Addr::string_to_addr (const char *s) if (s == 0) return -1; - const ACEXML_Char* http = ACE_TEXT("http://"); + const char* http = "http://"; int http_len = ACE_OS::strlen (http); // Check validity of URL if (ACE_OS::strncmp (http, s, http_len) != 0) ACE_ERROR_RETURN ((LM_ERROR, "Invalid URL %s\n", s), -1); - const ACEXML_Char* url = 0; + const char* url = 0; // Get the host name for (url = s + http_len; *url != '\0' && *url != ':' && *url != '/'; ++url) ; @@ -98,11 +98,11 @@ ACEXML_URL_Addr::string_to_addr (const char *s) int host_len = url - s; host_len -= http_len; - ACEXML_Char* host_name = 0; - ACE_NEW_RETURN (host_name, ACEXML_Char[host_len + 1], -1); + char* host_name = 0; + ACE_NEW_RETURN (host_name, char[host_len + 1], -1); ACE_OS::strncpy (host_name, s + http_len, host_len); host_name[host_len] = '\0'; - ACE_Auto_Basic_Array_Ptr cleanup_host_name (host_name); + ACE_Auto_Basic_Array_Ptr cleanup_host_name (host_name); // Get the port number (if any) unsigned short port = ACE_DEFAULT_HTTP_PORT; @@ -116,14 +116,14 @@ ACEXML_URL_Addr::string_to_addr (const char *s) return -1; // Get the path name - const ACEXML_Char* path_name = 0; + const char* path_name = 0; if (*url == '\0') - path_name = ACE_TEXT("/"); + path_name = "/"; else path_name = url; ACE_ALLOCATOR_RETURN (this->path_name_, - ACE_OS::strdup (path_name), + ACE_TEXT_CHAR_TO_TCHAR (ACE_OS::strdup (path_name)), -1); return result; } diff --git a/ChangeLog b/ChangeLog index 2c477727c09..b80ddbd3e74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +Fri Jul 12 20:28:52 2002 Krishnakumar B + + * ACEXML/common/URL_Addr.cpp (string_to_addr): + + Fixed confusion in handling normal and wchar strings. It should + compile now without problems. + + * ACEXML/apps/svcconf/Svcconf_Handler.cpp: + * ACEXML/apps/svcconf/Svcconf_Handler.i: + + Fixed memory leaks, some typos and used the locator to print + out error messages. + Fri Jul 12 17:55:08 2002 Carlos O'Ryan * ace/String_Base.i: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 2c477727c09..b80ddbd3e74 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,16 @@ +Fri Jul 12 20:28:52 2002 Krishnakumar B + + * ACEXML/common/URL_Addr.cpp (string_to_addr): + + Fixed confusion in handling normal and wchar strings. It should + compile now without problems. + + * ACEXML/apps/svcconf/Svcconf_Handler.cpp: + * ACEXML/apps/svcconf/Svcconf_Handler.i: + + Fixed memory leaks, some typos and used the locator to print + out error messages. + Fri Jul 12 17:55:08 2002 Carlos O'Ryan * ace/String_Base.i: -- cgit v1.2.1