]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
initialize allocated in constructors. Found by Klockwork (www.klocwork.com)
authorMichael Jerris <mike@jerris.com>
Fri, 16 May 2008 15:53:48 +0000 (15:53 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 16 May 2008 15:53:48 +0000 (15:53 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8438 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_cpp.h

index ac6cf709176c4e16dd18c614b97c0642fa20d003..04e7cad996a9c34ea4a1e87082b14e370ef6f655 100644 (file)
@@ -16,7 +16,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; 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)
+#define init_vars() do { allocated = 0; 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)
 
 
 //