]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix double error message on display api
authorBrian West <brian@freeswitch.org>
Thu, 13 May 2010 03:18:48 +0000 (22:18 -0500)
committerBrian West <brian@freeswitch.org>
Thu, 13 May 2010 03:18:48 +0000 (22:18 -0500)
src/mod/applications/mod_commands/mod_commands.c

index bc2d55741dd595377988657f9f15179c6ea3943c..500f35c44d5b18300b886c224c19bbc5c85821f9 100644 (file)
@@ -2302,6 +2302,7 @@ SWITCH_STANDARD_API(uuid_display_function)
 
        if (zstr(cmd) || argc < 2 || zstr(argv[0]) || zstr(argv[1])) {
                stream->write_function(stream, "-USAGE: %s\n", DISPLAY_SYNTAX);
+               goto end;
        } else {
                switch_core_session_message_t msg = { 0 };
                switch_core_session_t *lsession = NULL;
@@ -2322,6 +2323,8 @@ SWITCH_STANDARD_API(uuid_display_function)
                stream->write_function(stream, "-ERR Operation Failed\n");
        }
 
+ end:
+
        switch_safe_free(mycmd);
        return SWITCH_STATUS_SUCCESS;
 }