]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix regression
authorBrian West <brian@freeswitch.org>
Wed, 1 Jul 2009 03:17:58 +0000 (03:17 +0000)
committerBrian West <brian@freeswitch.org>
Wed, 1 Jul 2009 03:17:58 +0000 (03:17 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14078 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_nat.c

index 3fc746703e08ec032fea3971fe4c4adf05db212e..eb0701a69e49ab403fb567e4cfec4cfe1c2309a0 100644 (file)
@@ -69,11 +69,13 @@ static switch_status_t get_upnp_pubaddr(char *pub_addr)
        if (UPNP_GetExternalIPAddress(nat_globals.urls.controlURL,
                                                                   nat_globals.data.servicetype,
                                                                   pub_addr) == UPNPCOMMAND_SUCCESS) {
-               if (!strcmp(pub_addr, "0.0.0.0") || switch_strlen_zero(pub_addr)) {
+               if (!strcmp(pub_addr, "0.0.0.0") || switch_strlen_zero_buf(pub_addr)) {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, 
                                                          "uPNP Device (url: %s) returned an invalid external address of '%s'.  Disabling uPNP\n", nat_globals.urls.controlURL, pub_addr);
                        return SWITCH_STATUS_GENERR;
                }
+       } else {
+               return SWITCH_STATUS_GENERR;
        }
        return SWITCH_STATUS_SUCCESS;
 }