diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-10-14 07:54:31 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-10-14 07:54:31 +0000 |
commit | 8d906910eb339c861d232e3f96491237b4a15627 (patch) | |
tree | 4b04892dc6b2d1cfe45a3b5c9c953938a757f738 /ace/Svc_Conf.y | |
parent | 8807fa6fd809ad4f6df924590370f320cc2b7a86 (diff) | |
download | ATCD-8d906910eb339c861d232e3f96491237b4a15627.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/Svc_Conf.y')
-rw-r--r-- | ace/Svc_Conf.y | 43 |
1 files changed, 16 insertions, 27 deletions
diff --git a/ace/Svc_Conf.y b/ace/Svc_Conf.y index 2b27b76b130..43c508b1159 100644 --- a/ace/Svc_Conf.y +++ b/ace/Svc_Conf.y @@ -140,19 +140,6 @@ module ACE_ARGV args ($<static_node_>1->parameters ()); ACE_Module_Type *mt = get_module ($<static_node_>-1, $<static_node_>1); - // Make sure that the Module has the same name as the - // Module_Type object from the svc.conf file. - const char *module_type_name = $<static_node_>1->name (); - ACE_Module<ACE_SYNCH> *mp = (ACE_Module<ACE_SYNCH> *) mt->object (); - - if (ACE_OS::strcmp (mp->name (), module_type_name) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "warning: assigning Module_Type name %s to Module %s since names differ\n", - module_type_name, mp->name ())); - mp->name (module_type_name); - } - if (mt->init (args.argc (), args.argv ()) == -1 || ((ACE_Stream_Type *) ($<static_node_>-1)->record ()->type ())->push (mt) == -1) { @@ -165,19 +152,6 @@ module { ACE_Module_Type *mt = get_module ($<static_node_>-1, $<static_node_>1->name ()); - // Make sure that the Module has the same name as the - // Module_Type object from the svc.conf file. - const char *module_type_name = $<static_node_>1->name (); - ACE_Module<ACE_SYNCH> *mp = (ACE_Module<ACE_SYNCH> *) mt->object (); - - if (ACE_OS::strcmp (mp->name (), module_type_name) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "warning: assigning Module_Type name %s to Module %s since names differ\n", - module_type_name, mp->name ())); - mp->name (module_type_name); - } - if (((ACE_Stream_Type *) ($<static_node_>-1)->record ()->type ())->push (mt) == -1) yyerrno++; } @@ -311,6 +285,7 @@ get_module (ACE_Static_Node *str_rec, const char *svc_name) svc_name, str_rec->name ())); yyerrno++; } + return mt; } @@ -327,9 +302,23 @@ get_module (ACE_Static_Node *str_rec, ACE_Static_Node *svc_type) if (sr == 0 || st == 0 || mt == 0) { ACE_ERROR ((LM_ERROR, "cannot locate Module_Type %s or STREAM_Type %s\n", - svc_type->name (), str_rec->name ())); + svc_type->name (), str_rec->name ())); yyerrno++; } + + // Make sure that the Module has the same name as the + // Module_Type object from the svc.conf file. + const char *module_type_name = svc_type->name (); + ACE_Module<ACE_SYNCH> *mp = (ACE_Module<ACE_SYNCH> *) mt->object (); + + if (ACE_OS::strcmp (mp->name (), module_type_name) != 0) + { + ACE_DEBUG ((LM_DEBUG, + "warning: assigning Module_Type name %s to Module %s since names differ\n", + module_type_name, mp->name ())); + mp->name (module_type_name); + } + return mt; } |