]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix for FSCORE-100
authorMichael Jerris <mike@jerris.com>
Tue, 26 Feb 2008 22:03:30 +0000 (22:03 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 26 Feb 2008 22:03:30 +0000 (22:03 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7751 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_cpp.cpp

index 59b0068c4b0544eeb642c96d36f97521e2e2a4dc..4c5f49154c9d753ef8d170c8404bff526bb39374 100644 (file)
 
 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(char *nuuid)
 
 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);