diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-04-05 19:08:16 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-04-05 19:08:16 +0000 |
commit | 3cff5c33e4120cbf4319a19bf54d0d6fe55e6ce1 (patch) | |
tree | de7749c58da003e67f2df7e8482a9f818f87890a /pjsip-apps/src/samples/siprtp.c | |
parent | 2c2378f0048917b93ee35c85a36b49b65045c9a8 (diff) |
Added detection/protection against inaccurate timestamp in RTCP
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@388 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps/src/samples/siprtp.c')
-rw-r--r-- | pjsip-apps/src/samples/siprtp.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/pjsip-apps/src/samples/siprtp.c b/pjsip-apps/src/samples/siprtp.c index 75b89a25..03fb279f 100644 --- a/pjsip-apps/src/samples/siprtp.c +++ b/pjsip-apps/src/samples/siprtp.c @@ -175,7 +175,8 @@ static void destroy_call_media(unsigned call_index); static void app_perror(const char *sender, const char *title, pj_status_t status); - +/* Print call */ +static void print_call(int call_index); /* This is a PJSIP module to be registered by application to handle @@ -675,6 +676,13 @@ static void call_on_state_changed( pjsip_inv_session *inv, pj_time_val null_time = {0, 0}; + PJ_LOG(3,(THIS_FILE, "Call #%d disconnected. Reason=%s", + call->index, + pjsip_get_status_text(inv->cause)->ptr)); + PJ_LOG(3,(THIS_FILE, "Call #%d statistics:", call->index)); + print_call(call->index); + + call->inv = NULL; inv->mod_data[mod_siprtp.id] = NULL; @@ -684,9 +692,6 @@ static void call_on_state_changed( pjsip_inv_session *inv, call->response_time = null_time; call->connect_time = null_time; - PJ_LOG(3,(THIS_FILE, "Call #%d disconnected. Reason=%s", - call->index, - pjsip_get_status_text(inv->cause)->ptr)); } else if (inv->state == PJSIP_INV_STATE_CONFIRMED) { @@ -1471,7 +1476,7 @@ static void print_call(int call_index) } - if (call->media[0].thread == NULL) { + if (call->inv == NULL || call->inv->state < PJSIP_INV_STATE_CONFIRMED) { return; } |