summaryrefslogtreecommitdiff
path: root/pjsip
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-06-23 15:04:11 +0000
committerBenny Prijono <bennylp@teluu.com>2006-06-23 15:04:11 +0000
commitdaf2b65313488296bb1a563d6189a0e6774304af (patch)
treeb708e5c5dee50930add7b832076cb48563eb3010 /pjsip
parent55b49c7d5d6a707c6dc018d04f43275b42d7c9ac (diff)
Fixed 1st response time not initialized for UAS call in pjsua
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@549 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_call.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c
index 208cb97e..a745f76a 100644
--- a/pjsip/src/pjsua-lib/pjsua_call.c
+++ b/pjsip/src/pjsua-lib/pjsua_call.c
@@ -472,7 +472,6 @@ pj_bool_t pjsua_call_on_incoming(pjsip_rx_data *rdata)
/* Must answer with some response to initial INVITE.
- * If auto-answer flag is set, send 200 straight away, otherwise send 100.
*/
status = pjsip_inv_initial_answer(inv, rdata,
100, NULL, NULL, &response);
@@ -713,6 +712,9 @@ PJ_DEF(pj_status_t) pjsua_call_answer( pjsua_call_id call_id,
return PJSIP_ESESSIONTERMINATED;
}
+ if (call->res_time.sec == 0)
+ pj_gettimeofday(&call->res_time);
+
/* Create response message */
status = pjsip_inv_answer(call->inv, code, reason, NULL, &tdata);
if (status != PJ_SUCCESS) {
@@ -1587,6 +1589,8 @@ static void pjsua_call_on_state_changed(pjsip_inv_session *inv,
break;
case PJSIP_INV_STATE_DISCONNECTED:
pj_gettimeofday(&call->dis_time);
+ if (call->res_time.sec == 0)
+ pj_gettimeofday(&call->res_time);
if (e->body.tsx_state.tsx->status_code > call->last_code) {
call->last_code = e->body.tsx_state.tsx->status_code;
pj_strncpy(&call->last_text,