From 8107c49a64942c31084b39e463f7c48edf583026 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sat, 12 May 2007 07:29:12 +0000 Subject: [PATCH] add switch_cpp.cpp to msvc build. Fix some build issues and a bug. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5164 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_cpp.cpp | 6 +++++- w32/Library/FreeSwitchCore.vcproj | 32 +++++++++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/switch_cpp.cpp b/src/switch_cpp.cpp index f26ad92683..e87f96182e 100644 --- a/src/switch_cpp.cpp +++ b/src/switch_cpp.cpp @@ -1,6 +1,10 @@ #include #include +#ifdef _MSC_VER +#pragma warning(disable:4127 4003) +#endif + #define sanity_check(x) do { if (!session) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return x;}} while(0) #define init_vars() do { session = NULL; channel = NULL; uuid = NULL; tts_name = NULL; voice_name = NULL; memset(&args, 0, sizeof(args)); ap = NULL;} while(0) @@ -45,7 +49,7 @@ int CoreSession::preAnswer() { switch_status_t status; sanity_check(-1); - switch_channel_pre_answer(channel); + status = switch_channel_pre_answer(channel); return status == SWITCH_STATUS_SUCCESS ? 1 : 0; } diff --git a/w32/Library/FreeSwitchCore.vcproj b/w32/Library/FreeSwitchCore.vcproj index 113d8b4181..f79719a839 100644 --- a/w32/Library/FreeSwitchCore.vcproj +++ b/w32/Library/FreeSwitchCore.vcproj @@ -339,6 +339,30 @@ RelativePath="..\..\src\switch_core_timer.c" > + + + + + + + + @@ -450,11 +474,11 @@ > + +