From 9ff934f7fe2093bd7389dd030af7af0119677a21 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 12 May 2008 00:29:57 +0000 Subject: [PATCH] up git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8357 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_cpp.h | 10 +++++----- src/switch_cpp.cpp | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/include/switch_cpp.h b/src/include/switch_cpp.h index 775206170a..ab7d43295e 100644 --- a/src/include/switch_cpp.h +++ b/src/include/switch_cpp.h @@ -14,7 +14,7 @@ extern "C" { #define sanity_check(x) do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return x;}} while(0) #define sanity_check_noreturn do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return;}} 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; caller_profile.source = "mod_unknown"; caller_profile.dialplan = ""; caller_profile.context = ""; caller_profile.caller_id_name = ""; caller_profile.caller_id_number = ""; caller_profile.network_addr = ""; caller_profile.ani = ""; caller_profile.aniii = ""; caller_profile.rdnis = ""; caller_profile.username = ""; on_hangup = NULL; memset(&cb_state, 0, sizeof(cb_state)); hook_state = CS_NEW; } while(0) +#define init_vars() do { session = NULL; channel = NULL; uuid = NULL; tts_name = NULL; voice_name = NULL; xml_cdr_text = NULL; memset(&args, 0, sizeof(args)); ap = NULL; caller_profile.source = "mod_unknown"; caller_profile.dialplan = ""; caller_profile.context = ""; caller_profile.caller_id_name = ""; caller_profile.caller_id_number = ""; caller_profile.network_addr = ""; caller_profile.ani = ""; caller_profile.aniii = ""; caller_profile.rdnis = ""; caller_profile.username = ""; on_hangup = NULL; memset(&cb_state, 0, sizeof(cb_state)); hook_state = CS_NEW; } while(0) // @@ -169,12 +169,12 @@ class CoreSession { switch_file_handle_t local_fh; switch_file_handle_t *fhp; char dtmf_buf[512]; - SWITCH_DECLARE(switch_status_t) process_callback_result(char *ret); + public: SWITCH_DECLARE_CONSTRUCTOR CoreSession(); SWITCH_DECLARE_CONSTRUCTOR CoreSession(char *uuid); SWITCH_DECLARE_CONSTRUCTOR CoreSession(switch_core_session_t *new_session); - virtual SWITCH_DECLARE_CONSTRUCTOR ~CoreSession(); + SWITCH_DECLARE_CONSTRUCTOR ~CoreSession(); switch_core_session_t *session; switch_channel_t *channel; unsigned int flags; @@ -185,12 +185,12 @@ class CoreSession { SWITCH_DECLARE(int) answer(); SWITCH_DECLARE(int) preAnswer(); - virtual SWITCH_DECLARE(void) hangup(char *cause = "normal_clearing"); + SWITCH_DECLARE(void) hangup(char *cause = "normal_clearing"); SWITCH_DECLARE(void) setVariable(char *var, char *val); SWITCH_DECLARE(void) setPrivate(char *var, void *val); SWITCH_DECLARE(void *)getPrivate(char *var); SWITCH_DECLARE(const char *)getVariable(char *var); - + SWITCH_DECLARE(switch_status_t) process_callback_result(char *ret); /** \brief Record to a file * \param filename diff --git a/src/switch_cpp.cpp b/src/switch_cpp.cpp index 7d0340cf09..636b069aa8 100644 --- a/src/switch_cpp.cpp +++ b/src/switch_cpp.cpp @@ -936,7 +936,6 @@ SWITCH_DECLARE_NONSTD(switch_status_t) dtmf_callback(switch_core_session_t *sess } - SWITCH_DECLARE(switch_status_t) CoreSession::process_callback_result(char *ret) {