]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10704 [core] allow event-uuid (app_uuid) to be used in application
authorLuis Azedo <luis@2600hz.com>
Tue, 3 Oct 2017 03:28:20 +0000 (04:28 +0100)
committerLuis Azedo <luis@2600hz.com>
Tue, 3 Oct 2017 03:28:20 +0000 (04:28 +0100)
src/switch_core_session.c

index b57e239f92cb57127328a1f53e722b15792b5f57..e6da6b7a63238c251607e53046f3102c81b7c89f 100644 (file)
@@ -2765,7 +2765,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
 
        if ((app_uuid_var = switch_channel_get_variable(channel, "app_uuid"))) {
                app_uuid = (char *)app_uuid_var;
-               switch_channel_set_variable(channel, "app_uuid", NULL);
        } else {
                switch_uuid_str(uuid_str, sizeof(uuid_str));
        }
@@ -2881,6 +2880,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
                switch_event_fire(&event);
        }
 
+       if(app_uuid != uuid_str) {
+               switch_channel_set_variable(channel, "app_uuid", NULL);
+       };
+
        msg.message_id = SWITCH_MESSAGE_INDICATE_APPLICATION_EXEC_COMPLETE;
        switch_core_session_receive_message(session, &msg);