Browse Source

fix port==0 case

git.mgm/mediaproxy-ng/2.0
Richard Fuchs 15 years ago
parent
commit
d97e5c21ff
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      daemon/call.c

+ 6
- 2
daemon/call.c View File

@ -920,7 +920,9 @@ char *call_update_udp(const char **o, struct callmaster *m) {
st.ip = inet_addr(o[5]); st.ip = inet_addr(o[5]);
st.port = atoi(o[6]); st.port = atoi(o[6]);
st.mediatype = "unknown"; st.mediatype = "unknown";
if (st.ip == -1 || !st.port)
if (st.ip == -1)
goto fail;
if (!st.port && strcmp(o[6], "0"))
goto fail; goto fail;
g_queue_push_tail(&q, &st); 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.ip = inet_addr(o[5]);
st.port = atoi(o[6]); st.port = atoi(o[6]);
st.mediatype = "unknown"; st.mediatype = "unknown";
if (st.ip == -1 || !st.port)
if (st.ip == -1)
goto fail;
if (!st.port && strcmp(o[6], "0"))
goto fail; goto fail;
g_queue_push_tail(&q, &st); g_queue_push_tail(&q, &st);


Loading…
Cancel
Save