]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5861 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 9 Oct 2013 23:40:56 +0000 (04:40 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 9 Oct 2013 22:46:27 +0000 (17:46 -0500)
src/mod/applications/mod_dptools/mod_dptools.c

index 1146dc38cadb0437e800571f4a1197858c365a13..5fe2c57e5b4c836ce4e53bbdf776f9f597fcb712 100755 (executable)
@@ -283,10 +283,17 @@ SWITCH_STANDARD_APP(clear_digit_action_function)
 {
        //switch_channel_t *channel = switch_core_session_get_channel(session);
        switch_ivr_dmachine_t *dmachine;
-       char *realm = switch_core_session_strdup(session, data);
+       char *realm = NULL;
        char *target_str;
        switch_digit_action_target_t target = DIGIT_TARGET_SELF;
 
+       if (zstr(realm)) {
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "clear_digit_action called with no args");
+               return;
+       }
+
+       realm = switch_core_session_strdup(session, data);
+
        if ((target_str = strchr(realm, ','))) {
                *target_str++ = '\0';
                target = str2target(target_str);