From d97e5c21ff905daeee2e957b522f2334682de599 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 28 Apr 2011 20:38:02 +0000 Subject: [PATCH] fix port==0 case --- daemon/call.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index 82fe9b6f1..ddaae0026 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -920,7 +920,9 @@ char *call_update_udp(const char **o, struct callmaster *m) { st.ip = inet_addr(o[5]); st.port = atoi(o[6]); st.mediatype = "unknown"; - if (st.ip == -1 || !st.port) + if (st.ip == -1) + goto fail; + if (!st.port && strcmp(o[6], "0")) goto fail; g_queue_push_tail(&q, &st); @@ -953,7 +955,9 @@ char *call_lookup_udp(const char **o, struct callmaster *m) { st.ip = inet_addr(o[5]); st.port = atoi(o[6]); st.mediatype = "unknown"; - if (st.ip == -1 || !st.port) + if (st.ip == -1) + goto fail; + if (!st.port && strcmp(o[6], "0")) goto fail; g_queue_push_tail(&q, &st);