summaryrefslogtreecommitdiff
path: root/pjnath
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-04-01 18:21:46 +0000
committerBenny Prijono <bennylp@teluu.com>2008-04-01 18:21:46 +0000
commit13c9e2c19ac1ffa6bf5d4ffbf965e5662d9ff3b6 (patch)
tree5d1daf67482047df7eadd6e403912233ddb28387 /pjnath
parent84d1eb569f2c6f5389c3e9bc86490d33eec6b814 (diff)
Ticket #519: STUN request is not freed when transaction times out (thanks Amit Sharma)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1903 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjnath')
-rw-r--r--pjnath/src/pjnath/stun_session.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/pjnath/src/pjnath/stun_session.c b/pjnath/src/pjnath/stun_session.c
index 63598bba..160ee1a6 100644
--- a/pjnath/src/pjnath/stun_session.c
+++ b/pjnath/src/pjnath/stun_session.c
@@ -381,6 +381,12 @@ static void stun_tsx_on_complete(pj_stun_client_tsx *tsx,
response,
src_addr, src_addr_len);
}
+
+ /* Destroy the transmit data. This will remove the transaction
+ * from the pending list too.
+ */
+ pj_stun_msg_destroy_tdata(sess, tdata);
+ tdata = NULL;
}
static pj_status_t stun_tsx_on_send_msg(pj_stun_client_tsx *tsx,
@@ -1032,14 +1038,6 @@ static pj_status_t on_incoming_response(pj_stun_session *sess,
return status;
}
- /* If transaction has completed, destroy the transmit data.
- * This will remove the transaction from the pending list too.
- */
- if (pj_stun_client_tsx_is_complete(tdata->client_tsx)) {
- pj_stun_msg_destroy_tdata(sess, tdata);
- tdata = NULL;
- }
-
return PJ_SUCCESS;
}