[Ace-users] [ace-bugs] netsvcs:"Name Service"; ACE::ACE_Naming_Context::init(int argc, ACE_TCHAR *argv) and ...
Johnny Willemsen
jwillemsen at remedy.nl
Fri Dec 7 03:01:01 CST 2007
Hi,
Thanks for using the PRF form. If you can make Naming_Context that it is
independent of argv it would be great. Maybe use ACE_OS::getprogname () as
other option?
Regards,
Johnny Willemsen
Remedy IT
Postbus 101
2650 AC Berkel en Rodenrijs
The Netherlands
www.theaceorb.nl / www.remedy.nl
*** Integrated compile and test statistics see
http://scoreboard.theaceorb.nl ***
*** Commercial service and support for ACE/TAO/CIAO ***
*** See http://www.theaceorb.nl/en/support.html ***
> ACE VERSION: 5.6.1
> HOST MACHINE and OPERATING SYSTEM: Win32
>
> SYNOPSIS:
> Wrong init ACE_Naming_Context when dynamically linked
>
>
> DESCRIPTION:
>
> line 102, Naming_Context.h consists:
> // = Dynamic initialization hooks.
> /// Initialize name options and naming context when dynamically
> /// linked.
> virtual int init (int argc, ACE_TCHAR *argv[]);
>
> Implementation of this method is based on the parameter
> argv[0] - "process
> name"
> (see line 590, Naming_Context.cpp)
> BUG:
> but when using dynamically linked service, config
> parameters do not
> contain the "argv[0] -> process_name".
>
>
> MY PROPOSALS:
> Doug, my proposal applies not only to correct the error
> but to prevent such misunderstandings when using functions like
> parse_args (int argc, ACE_TCHAR *argv[]) or init (int argc, ACE_TCHAR
> *argv[])
> in the future.
>
> We need to simulate the command line main() function
> and pass always, as the first parameter "supername" when using dynamic
> svc.conf configuration.
> as the "supername" can be used either dll/shared name, either
> Service_Object
> reponame.
> for example svc.conf line:
> dynamic MySuperNameServer Service_Object *
> netsvcsd:_make_ACE_Name_Acceptor() "-p 20222 -l ..\ -s test"
> init string for Service_Object can be transformed:
> either: "netsvcsd -p 20222 -l ..\ -s test"
> either: "MySuperNameServer -p 20222 -l ..\ -s test".
> I think the latest version of the most preferable.
>
>
> I can spend a some time to eliminate errors in the Naming_Context.cpp
> but may be required to change the default behavior of
> ACE_Name_Options::parse_args.
>
>
> IHMO more preferable to changing behavior ACE_Service_Config
> translating
> params string.
> One of the many merits of my favorites ACE is the flexibility
> and rapid
> creation of the units,
> as applicable or .exe or .dll context.
>
>
> Regards,
> ____________________________________________
> Vladislav Zverev
> GTSS , St.Petersburg, Russia
>
More information about the Ace-users
mailing list