]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
CID:1294463,1294540: clean up duplicate error checking code
authorMichael Jerris <mike@jerris.com>
Thu, 23 Apr 2015 15:06:04 +0000 (11:06 -0400)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:25 +0000 (12:47 -0500)
src/mod/applications/mod_commands/mod_commands.c

index 3ef718b7bab2e5e945f99dbff7640e44d2ad0874..dc3bba44aa3ed12b5f37b0c61429396e0669c4e5 100644 (file)
@@ -434,7 +434,6 @@ SWITCH_STANDARD_API(reg_url_function)
        char *reply = "error/facility_not_subscribed";
        switch_stream_handle_t mystream = { 0 };
 
-
        if (!cmd) {
                stream->write_function(stream, "%s", "");
                return SWITCH_STATUS_SUCCESS;
@@ -445,7 +444,6 @@ SWITCH_STANDARD_API(reg_url_function)
                exclude_contact = switch_channel_get_variable(channel, "sip_exclude_contact");
        }
 
-
        data = strdup(cmd);
        switch_assert(data);
 
@@ -467,18 +465,12 @@ SWITCH_STANDARD_API(reg_url_function)
                domain = dup_domain;
        }
 
-       if (!user) goto end;
-
-
        SWITCH_STANDARD_STREAM(mystream);
        switch_assert(mystream.data);
 
        select_url(user, domain, concat, exclude_contact, &mystream);
        reply = mystream.data;
 
-
-  end:
-
        if (zstr(reply)) {
                reply = "error/user_not_registered";
        } else if (end_of(reply) == ',') {
@@ -489,7 +481,6 @@ SWITCH_STANDARD_API(reg_url_function)
        reply = NULL;
 
        switch_safe_free(mystream.data);
-
        switch_safe_free(data);
        switch_safe_free(dup_domain);