diff options
Diffstat (limited to 'ACE')
-rw-r--r-- | ACE/ChangeLog | 11 | ||||
-rw-r--r-- | ACE/ace/Parse_Node.cpp | 127 | ||||
-rw-r--r-- | ACE/ace/Service_Gestalt.cpp | 20 | ||||
-rw-r--r-- | ACE/ace/config-WinCE.h | 1 |
4 files changed, 97 insertions, 62 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 5dfe43b1276..ea04ca52028 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,14 @@ +Fri Nov 14 19:03:30 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/Parse_Node.cpp: + Only print the debug message when ACE::debug() is enabled. This + prevent a lot of messages on the WinCE console. Fixes bugzilla + 3505 + + * ace/Service_Gestalt.cpp: + Renamed getopt to get_opt so that we can remove all the fuzz + disable/enable lines + Fri Nov 14 18:54:30 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> * tests/Bug_3505_Regression_Test.cpp: diff --git a/ACE/ace/Parse_Node.cpp b/ACE/ace/Parse_Node.cpp index fab2580bcc7..bcd9cb7229e 100644 --- a/ACE/ace/Parse_Node.cpp +++ b/ACE/ace/Parse_Node.cpp @@ -15,15 +15,14 @@ ACE_RCSID (ace, Parse_Node, "$Id$") - - ACE_BEGIN_VERSIONED_NAMESPACE_DECL +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE (ACE_Stream_Node) // Provide the class hierarchy that defines the parse tree of Service // Nodes. - void +void ACE_Stream_Node::dump (void) const { #if defined (ACE_HAS_DUMP) @@ -58,9 +57,12 @@ ACE_Stream_Node::apply (ACE_Service_Gestalt *config, int &yyerrno) if (yyerrno != 0) { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("dynamic initialization failed for Module %s\n"), - module->name ())); + if (ACE::debug ()) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("dynamic initialization failed for Module %s\n"), + module->name ())); + } ++yyerrno; } @@ -71,9 +73,12 @@ ACE_Stream_Node::apply (ACE_Service_Gestalt *config, int &yyerrno) if (st->push (mt) == -1) { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("dynamic initialization failed for Stream %s\n"), - this->node_->name ())); + if (ACE::debug ()) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("dynamic initialization failed for Stream %s\n"), + this->node_->name ())); + } ++yyerrno; } @@ -465,11 +470,14 @@ ACE_Location_Node::open_dll (int & yyerrno) ++yyerrno; #ifndef ACE_NLOGGING - ACE_TCHAR *errmsg = this->dll_.error (); - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ACE (%P|%t) LN::open_dll - Failed to open %s: %s\n"), - this->pathname (), - errmsg ? errmsg : ACE_TEXT ("no error reported"))); + if (ACE::debug ()) + { + ACE_TCHAR *errmsg = this->dll_.error (); + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("ACE (%P|%t) LN::open_dll - Failed to open %s: %s\n"), + this->pathname (), + errmsg ? errmsg : ACE_TEXT ("no error reported"))); + } #endif /* ACE_NLOGGING */ return -1; @@ -521,12 +529,15 @@ ACE_Object_Node::symbol (ACE_Service_Gestalt *, ++yyerrno; #ifndef ACE_NLOGGING - ACE_TCHAR *errmsg = this->dll_.error (); - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ACE (%P|%t) DLL::symbol -") - ACE_TEXT (" Failed for object %s: %s\n"), - object_name, - errmsg ? errmsg : ACE_TEXT ("no error reported"))); + if (ACE::debug ()) + { + ACE_TCHAR *errmsg = this->dll_.error (); + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("ACE (%P|%t) DLL::symbol -") + ACE_TEXT (" Failed for object %s: %s\n"), + object_name, + errmsg ? errmsg : ACE_TEXT ("no error reported"))); + } #endif /* ACE_NLOGGING */ return 0; @@ -647,12 +658,15 @@ ACE_Function_Node::symbol (ACE_Service_Gestalt *, ++yyerrno; #ifndef ACE_NLOGGING - ACE_TCHAR * const errmsg = this->dll_.error (); - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("DLL::symbol failed for function %s: ") - ACE_TEXT ("%s\n"), - function_name, - errmsg ? errmsg : ACE_TEXT ("no error reported"))); + if (ACE::debug ()) + { + ACE_TCHAR * const errmsg = this->dll_.error (); + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("DLL::symbol failed for function %s: ") + ACE_TEXT ("%s\n"), + function_name, + errmsg ? errmsg : ACE_TEXT ("no error reported"))); + } #endif /* ACE_NLOGGING */ return 0; @@ -673,10 +687,13 @@ ACE_Function_Node::symbol (ACE_Service_Gestalt *, if (this->symbol_ == 0) { ++yyerrno; - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - this->function_name_), - 0); + if (ACE::debug ()) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("%p\n"), + this->function_name_)); + } + return 0; } } return this->symbol_; @@ -766,11 +783,14 @@ ACE_Static_Function_Node::symbol (ACE_Service_Gestalt *config, if (config->find_static_svc_descriptor (this->function_name_, &ssd) == -1) { ++yyerrno; - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) No static service ") - ACE_TEXT ("registered for function %s\n"), - this->function_name_), - 0); + if (ACE::debug ()) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("(%P|%t) No static service ") + ACE_TEXT ("registered for function %s\n"), + this->function_name_)); + } + return 0; } if (ssd->alloc_ == 0) @@ -781,11 +801,14 @@ ACE_Static_Function_Node::symbol (ACE_Service_Gestalt *config, { ++yyerrno; - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) No static service factory ") - ACE_TEXT ("function registered for function %s\n"), - this->function_name_), - 0); + if (ACE::debug ()) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("(%P|%t) No static service factory ") + ACE_TEXT ("function registered for function %s\n"), + this->function_name_)); + } + return 0; } } @@ -795,10 +818,13 @@ ACE_Static_Function_Node::symbol (ACE_Service_Gestalt *config, if (this->symbol_ == 0) { ++yyerrno; - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - this->function_name_), - 0); + if (ACE::debug ()) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("%p\n"), + this->function_name_)); + } + return 0; } return this->symbol_; @@ -834,7 +860,7 @@ ACE_Service_Type_Factory::make_service_type (ACE_Service_Gestalt *cfg) const { ACE_TRACE ("ACE_Service_Type_Factory::make_service_type"); - u_int flags = ACE_Service_Type::DELETE_THIS + u_int const flags = ACE_Service_Type::DELETE_THIS | (this->location_->dispose () == 0 ? 0 : ACE_Service_Type::DELETE_OBJ); int yyerrno = 0; @@ -864,10 +890,13 @@ ACE_Service_Type_Factory::make_service_type (ACE_Service_Gestalt *cfg) const } #ifndef ACE_NLOGGING - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ACE (%P|%t) Unable to create ") - ACE_TEXT ("service object for %s\n"), - this->name ())); + if (ACE::debug ()) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("ACE (%P|%t) Unable to create ") + ACE_TEXT ("service object for %s\n"), + this->name ())); + } #endif ++yyerrno; return 0; diff --git a/ACE/ace/Service_Gestalt.cpp b/ACE/ace/Service_Gestalt.cpp index cca8d399602..ad0522b318f 100644 --- a/ACE/ace/Service_Gestalt.cpp +++ b/ACE/ace/Service_Gestalt.cpp @@ -1147,26 +1147,22 @@ ACE_Service_Gestalt::parse_args_i (int argc, bool &ignore_default_svc_conf_file) { ACE_TRACE ("ACE_Service_Gestalt::parse_args_i"); - //FUZZ: disable check_for_lack_ACE_OS - ACE_Get_Opt getopt (argc, - argv, - ACE_TEXT ("df:k:nyS:"), - 1); // Start at argv[1]. - //FUZZ: enable check_for_lack_ACE_OS + ACE_Get_Opt get_opt (argc, + argv, + ACE_TEXT ("df:k:nyS:"), + 1); // Start at argv[1]. if (this->init_svc_conf_file_queue () == -1) return -1; - //FUZZ: disable check_for_lack_ACE_OS - for (int c; (argc != 0) && ((c = getopt ()) != -1); ) - //FUZZ: enable check_for_lack_ACE_OS + for (int c; (argc != 0) && ((c = get_opt ()) != -1); ) switch (c) { case 'd': ACE::debug (1); break; case 'f': - if (this->svc_conf_file_queue_->enqueue_tail (ACE_TString (getopt.opt_arg ())) == -1) + if (this->svc_conf_file_queue_->enqueue_tail (ACE_TString (get_opt.opt_arg ())) == -1) ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("enqueue_tail")), @@ -1178,7 +1174,7 @@ ACE_Service_Gestalt::parse_args_i (int argc, * @TODO: Is this always a static storage? Shouldn't we copy * & gain ownership of the value? */ - this->logger_key_ = getopt.opt_arg (); + this->logger_key_ = get_opt.opt_arg (); break; case 'n': this->no_static_svcs_ = 1; @@ -1194,7 +1190,7 @@ ACE_Service_Gestalt::parse_args_i (int argc, -1); } - if (this->svc_queue_->enqueue_tail (ACE_TString (getopt.opt_arg ())) == -1) + if (this->svc_queue_->enqueue_tail (ACE_TString (get_opt.opt_arg ())) == -1) ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("enqueue_tail")), diff --git a/ACE/ace/config-WinCE.h b/ACE/ace/config-WinCE.h index bc7cfa7e621..bbdf5699368 100644 --- a/ACE/ace/config-WinCE.h +++ b/ACE/ace/config-WinCE.h @@ -190,7 +190,6 @@ // @@ NSIG value. This is definitely not correct. #define NSIG 23 - // @@ For some reason, WinCE forgot to define this. // Need to find out what it is. (Used in MapViewOfFile ().) #define FILE_MAP_COPY 0 |