From: Chris Rienzo Date: Wed, 29 Jul 2015 19:08:43 +0000 (-0400) Subject: FS-7912 add session UUID to embedded language (lua, javascript, etc) logs when sessio... X-Git-Tag: v1.6.2~218 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a0bfbf61a71e289fa0f62c3b0f47d13ba0d1658;p=thirdparty%2Ffreeswitch.git FS-7912 add session UUID to embedded language (lua, javascript, etc) logs when session sanity check fails --- diff --git a/src/include/switch_cpp.h b/src/include/switch_cpp.h index 07c77ec54f..7fef07f4cd 100644 --- a/src/include/switch_cpp.h +++ b/src/include/switch_cpp.h @@ -11,8 +11,8 @@ extern "C" { #include #define this_check(x) do { if (!this) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "object is not initalized\n"); return x;}} while(0) #define this_check_void() do { if (!this) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "object is not initalized\n"); return;}} while(0) -#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 sanity_check(x) do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid),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_UUID_LOG(uuid),SWITCH_LOG_ERROR, "session is not initalized\n"); return;}} while(0) #define init_vars() allocated = 0; \ session = NULL; \ channel = NULL; \