]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7912 add session UUID to embedded language (lua, javascript, etc) logs when sessio...
authorChris Rienzo <chris.rienzo@citrix.com>
Wed, 29 Jul 2015 19:08:43 +0000 (15:08 -0400)
committerChris Rienzo <chris.rienzo@citrix.com>
Wed, 29 Jul 2015 19:11:47 +0000 (15:11 -0400)
src/include/switch_cpp.h

index 07c77ec54fd3fe13c6485e4257eff0f19f71fd51..7fef07f4cd0a4bc7d15de5d36468c7a9798babea 100644 (file)
@@ -11,8 +11,8 @@ extern "C" {
 #include <switch.h>
 #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;                                                                         \