From b68a3f97fc13980f97e897384ef15d20d85e96df Mon Sep 17 00:00:00 2001 From: Brian West Date: Fri, 5 Sep 2008 03:44:02 +0000 Subject: [PATCH] if the string is empty lets use the guessed ip instead. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9457 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 0d5ae0f2b9..f36660a3e0 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -1524,7 +1524,9 @@ switch_status_t config_sofia(int reload, char *profile_name) switch_copy_string(stun_ip, ip, sizeof(stun_ip)); - if (!strcasecmp(val, "0.0.0.0")) { + if (!switch_strlen_zero(val)) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid IP replaced with %s\n", mod_sofia_globals.guess_ip); + } else if (!strcasecmp(val, "0.0.0.0")) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invald IP 0.0.0.0 replaced with %s\n", mod_sofia_globals.guess_ip); } else if (strcasecmp(val, "auto")) { switch_port_t port = 0;