only set console when we have a console

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6535 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2007-12-06 13:40:00 +00:00
parent 8a01509d13
commit 18ca278d9b
4 changed files with 13 additions and 9 deletions

View File

@@ -180,7 +180,7 @@ void WINAPI service_main(DWORD numArgs, char **args)
set_high_priority();
/* attempt to initialize freeswitch and load modules */
if (switch_core_init_and_modload(flags, &err) != SWITCH_STATUS_SUCCESS) {
if (switch_core_init_and_modload(flags, SWITCH_FALSE, &err) != SWITCH_STATUS_SUCCESS) {
/* freeswitch did not start sucessfully */
status.dwCurrentState = SERVICE_STOPPED;
} else {
@@ -416,7 +416,7 @@ int main(int argc, char *argv[])
}
#endif
if (switch_core_init_and_modload(flags, &err) != SWITCH_STATUS_SUCCESS) {
if (switch_core_init_and_modload(flags, nc ? SWITCH_FALSE : SWITCH_TRUE, &err) != SWITCH_STATUS_SUCCESS) {
fprintf(stderr, "Cannot Initilize [%s]\n", err);
return 255;
}