[Ace-users] ACE_Service_Config::process_directive
joe
joelihn at hotmail.com
Wed Dec 26 01:53:29 CST 2007
ACE VERSION: 5.5.10
HOST MACHINE and OPERATING SYSTEM: winxp
COMPILER NAME AND VERSION (AND PATCHLEVEL): g++
THE $ACE_ROOT/ace/config.h FILE : #include "ace/config-win32.h"
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU
FILE :platform_macros.GNU
DESCRIPTION:
in main.cpp:
...
ACE_Service_Config *asc;
...
asc = ACE_Service_Config::global();
asc->close();
asc->process_directive("dynamic 1 ...");
...
in another.cpp:
...
extern ACE_Service_Config *asc;
...
asc->process_directive("dynamic 2 ...");
const ACE_Service_Type *svc_rec = 0;
if (ACE_Service_Repository::instance()->find("2", &svc_rec) == -1) {
ACE_DEBUG((LM_INFO, ACE_TEXT("\Abort.\n")));
asc->close();
return 0;
}
...
It will print: Abort.
find returns -1,why?
More information about the Ace-users
mailing list