提交 fbbd6204 authored 作者: Anthony Minessale's avatar Anthony Minessale

unint memory may be confused for an ip change

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14623 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 b8db86a3
...@@ -245,7 +245,7 @@ switch_status_t init_nat_monitor(switch_memory_pool_t *pool) ...@@ -245,7 +245,7 @@ switch_status_t init_nat_monitor(switch_memory_pool_t *pool)
static void *SWITCH_THREAD_FUNC switch_nat_multicast_runtime(switch_thread_t *thread, void *obj) static void *SWITCH_THREAD_FUNC switch_nat_multicast_runtime(switch_thread_t *thread, void *obj)
{ {
char *buf = NULL; char *buf = NULL;
char newip[16]; char newip[16] = "";
char *pos; char *pos;
switch_event_t *event = NULL; switch_event_t *event = NULL;
...@@ -283,6 +283,7 @@ static void *SWITCH_THREAD_FUNC switch_nat_multicast_runtime(switch_thread_t *th ...@@ -283,6 +283,7 @@ static void *SWITCH_THREAD_FUNC switch_nat_multicast_runtime(switch_thread_t *th
if (!strncmp(pos, "ssdp:alive", 10)) { if (!strncmp(pos, "ssdp:alive", 10)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "got UPnP keep alive packet: \n%s\n", buf); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "got UPnP keep alive packet: \n%s\n", buf);
/* did pub ip change */ /* did pub ip change */
newip[0] = '\0';
if (get_upnp_pubaddr(newip) != SWITCH_STATUS_SUCCESS) { if (get_upnp_pubaddr(newip) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unable to get current pubaddr after receiving UPnP keep alive packet.\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unable to get current pubaddr after receiving UPnP keep alive packet.\n");
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论