]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
doh
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 31 Oct 2007 23:01:32 +0000 (23:01 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 31 Oct 2007 23:01:32 +0000 (23:01 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6115 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core_session.c

index 3b1a523fa1f7fd9aa302bc232a0e546c342bed41..4b3933803ef32f373376cb64bf02f0e6466f5c1c 100644 (file)
@@ -905,6 +905,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
        switch_event_t *event;
        switch_channel_t *channel;
 
+       if (switch_strlen_zero(arg)) {
+               arg = "_undef_";
+       }
+
        log = switch_core_session_alloc(session, sizeof(*log));
 
        assert(log != NULL);
@@ -923,7 +927,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
        if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE) == SWITCH_STATUS_SUCCESS) {
                switch_channel_event_set_data(session->channel, event);
                switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Application", "%s", application_interface->interface_name);
-               switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Application-Data", arg);
+               switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Application-Data", "%s", arg);
                switch_event_fire(&event);
        }