fix cpp wrapper

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8037 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-04-04 22:58:34 +00:00
parent 58e0ac0584
commit a06997ee9a
1 changed files with 6 additions and 3 deletions

View File

@ -71,12 +71,11 @@ CoreSession::CoreSession()
CoreSession::CoreSession(char *nuuid) CoreSession::CoreSession(char *nuuid)
{ {
memset(&caller_profile, 0, sizeof(caller_profile));
init_vars();
if (session = switch_core_session_locate(nuuid)) { if (session = switch_core_session_locate(nuuid)) {
channel = switch_core_session_get_channel(session); channel = switch_core_session_get_channel(session);
init_vars();
uuid = strdup(nuuid); uuid = strdup(nuuid);
memset(&caller_profile, 0, sizeof(caller_profile));
allocated = 1; allocated = 1;
} }
} }
@ -162,6 +161,8 @@ void CoreSession::execute(char *app, char *data)
void CoreSession::setDTMFCallback(void *cbfunc, char *funcargs) { void CoreSession::setDTMFCallback(void *cbfunc, char *funcargs) {
sanity_check_noreturn;
cb_state.funcargs = funcargs; cb_state.funcargs = funcargs;
cb_state.function = cbfunc; cb_state.function = cbfunc;
@ -466,6 +467,8 @@ void CoreSession::setCallerData(char *var, char *val) {
void CoreSession::setHangupHook(void *hangup_func) { void CoreSession::setHangupHook(void *hangup_func) {
sanity_check_noreturn;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CoreSession::seHangupHook, hangup_func: %p\n", hangup_func); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CoreSession::seHangupHook, hangup_func: %p\n", hangup_func);
on_hangup = hangup_func; on_hangup = hangup_func;
switch_channel_t *channel = switch_core_session_get_channel(session); switch_channel_t *channel = switch_core_session_get_channel(session);