Browse Source

take rtcp ports into account when checking for timeouts

git.mgm/mediaproxy-ng/2.0
Richard Fuchs 14 years ago
parent
commit
f3a5ea2eb8
1 changed files with 13 additions and 11 deletions
  1. +13
    -11
      daemon/call.c

+ 13
- 11
daemon/call.c View File

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


Loading…
Cancel
Save