Author: mikej Date: Wed Sep 20 16:47:28 2006 New Revision: 2767 Modified: freeswitch/trunk/src/switch.c freeswitch/trunk/src/switch_console.c freeswitch/trunk/src/switch_core.c Log: win32 tweaks Modified: freeswitch/trunk/src/switch.c ============================================================================== --- freeswitch/trunk/src/switch.c (original) +++ freeswitch/trunk/src/switch.c Wed Sep 20 16:47:28 2006 @@ -233,8 +233,6 @@ #ifdef WIN32 FreeConsole(); - snprintf(path, sizeof(path), "Global\\Freeswitch.%d", getpid()); - shutdown_event = CreateEvent(NULL, FALSE, FALSE, path); #else if ((pid = fork())) { fprintf(stderr, "%d Backgrounding.\n", (int)pid); Modified: freeswitch/trunk/src/switch_console.c ============================================================================== --- freeswitch/trunk/src/switch_console.c (original) +++ freeswitch/trunk/src/switch_console.c Wed Sep 20 16:47:28 2006 @@ -221,13 +221,22 @@ if (activity) { switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_CONSOLE, "\nfreeswitch@%s> ", hostname); } - + +#ifdef _MSC_VER +//Microsofts macros don't pass their own compilers warnings. +#pragma warning(push) +#pragma warning(disable: 4127 4389) +#endif + FD_ZERO(&rfds); FD_ZERO(&efds); FD_SET(fileno(stdin), &rfds); FD_SET(fileno(stdin), &efds); activity = select(fileno(stdin)+1, &rfds, NULL, &efds, &tv); +#ifdef _MSC_VER +#pragma warning(pop) +#endif if (activity == 0) { fflush(stdout); continue; Modified: freeswitch/trunk/src/switch_core.c ============================================================================== --- freeswitch/trunk/src/switch_core.c (original) +++ freeswitch/trunk/src/switch_core.c Wed Sep 20 16:47:28 2006 @@ -3511,12 +3511,17 @@ return 0; } - SWITCH_DECLARE(void) switch_core_runtime_loop(int bg) { +#ifdef WIN32 + HANDLE shutdown_event; + char path[256] = ""; +#endif if (bg) { bg = 0; #ifdef WIN32 + snprintf(path, sizeof(path), "Global\\Freeswitch.%d", getpid()); + shutdown_event = CreateEvent(NULL, FALSE, FALSE, path); WaitForSingleObject(shutdown_event, INFINITE); #else runtime.running = 1;