take rtcp ports into account when checking for timeouts

git.mgm/mediaproxy-ng/2.1
Richard Fuchs 13 years ago
parent 6b48cb0d49
commit 2a8c07df0e

@ -439,11 +439,12 @@ static void call_timer_iterator(void *key, void *val, void *ptr) {
struct iterator_helper *hlp = ptr; struct iterator_helper *hlp = ptr;
GList *it; GList *it;
struct callstream *cs; struct callstream *cs;
int i; int i, j;
struct peer *p; struct peer *p;
struct poller *po; struct poller *po;
struct callmaster *cm; struct callmaster *cm;
unsigned int check; unsigned int check;
struct streamrelay *sr;
if (!c->callstreams->head) if (!c->callstreams->head)
goto drop; goto drop;
@ -456,18 +457,19 @@ static void call_timer_iterator(void *key, void *val, void *ptr) {
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
p = &cs->peers[i]; p = &cs->peers[i];
for (j = 0; j < 2; j++) {
sr = &p->rtps[j];
hlp->ports[sr->localport] = sr;
hlp->ports[p->rtps[0].localport] = &p->rtps[0]; check = cm->timeout;
hlp->ports[p->rtps[1].localport] = &p->rtps[1]; if (!sr->peer.port)
check = cm->silent_timeout;
check = cm->timeout; else if (IN6_IS_ADDR_UNSPECIFIED(&sr->peer.ip46))
if (!p->rtps[0].peer.port) check = cm->silent_timeout;
check = cm->silent_timeout;
else if (IN6_IS_ADDR_UNSPECIFIED(&p->rtps[0].peer.ip46))
check = cm->silent_timeout;
if (po->now - p->rtps[0].last < check) if (po->now - sr->last < check)
goto good; goto good;
}
} }
} }

Loading…
Cancel
Save