mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-05 20:01:55 +00:00
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:
+5
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user