[Freeswitch-svn] [commit] r7751 - freeswitch/trunk/src
Freeswitch SVN
mikej at freeswitch.org
Tue Feb 26 17:03:31 EST 2008
Author: mikej
Date: Tue Feb 26 17:03:30 2008
New Revision: 7751
Modified:
freeswitch/trunk/src/switch_cpp.cpp
Log:
fix for FSCORE-100
Modified: freeswitch/trunk/src/switch_cpp.cpp
==============================================================================
--- freeswitch/trunk/src/switch_cpp.cpp (original)
+++ freeswitch/trunk/src/switch_cpp.cpp Tue Feb 26 17:03:30 2008
@@ -45,11 +45,33 @@
CoreSession::CoreSession()
{
- 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; cb_state.function = NULL; } while(0);
+ session = NULL;
+ channel = NULL;
+ uuid = NULL;
+ tts_name = NULL;
+ voice_name = NULL;
+ memset(&args, 0, sizeof(args));
+ ap = NULL;
+ on_hangup = NULL;
+ cb_state.function = NULL;
+
+ memset(&caller_profile, 0, sizeof(caller_profile));
+ 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 = "";
+
}
CoreSession::CoreSession(char *nuuid)
{
+ memset(&caller_profile, 0, sizeof(caller_profile));
init_vars();
uuid = strdup(nuuid);
if (session = switch_core_session_locate(uuid)) {
@@ -59,6 +81,7 @@
CoreSession::CoreSession(switch_core_session_t *new_session)
{
+ memset(&caller_profile, 0, sizeof(caller_profile));
init_vars();
session = new_session;
channel = switch_core_session_get_channel(session);
More information about the Freeswitch-svn
mailing list