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
This commit is contained in:
Michael Jerris 2007-05-12 07:29:12 +00:00
parent aacca3467b
commit 8107c49a64
2 changed files with 35 additions and 3 deletions

View File

@ -1,6 +1,10 @@
#include <switch.h>
#include <switch_cpp.h>
#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;
}

View File

@ -339,6 +339,30 @@
RelativePath="..\..\src\switch_core_timer.c"
>
</File>
<File
RelativePath="..\..\src\switch_cpp.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
PrecompiledHeaderFile=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
PrecompiledHeaderFile=""
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\src\switch_event.c"
>
@ -450,11 +474,11 @@
>
</File>
<File
RelativePath="..\..\src\include\private\switch_core.h"
RelativePath="..\..\src\include\switch_core.h"
>
</File>
<File
RelativePath="..\..\src\include\switch_core.h"
RelativePath="..\..\src\include\private\switch_core.h"
>
</File>
<File
@ -465,6 +489,10 @@
RelativePath="..\..\src\include\switch_core_event_hook.h"
>
</File>
<File
RelativePath="..\..\src\include\switch_cpp.h"
>
</File>
<File
RelativePath="..\..\src\include\switch_event.h"
>