diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2011-10-11 07:26:16 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2011-10-11 07:26:16 +0000 |
commit | e9dc1709d61e89a6208680775c9345a69609ee1b (patch) | |
tree | 6bcbbe0a96d8d8b65410eafd2ac4b8f170db18bd | |
parent | cd27c9da852fb6008d03cf2e87cd56a7979bf0dd (diff) |
Fixed #1386: fixed send_raw_resolver_callback() in sip_util.c, should increment tdata ref count before calling pjsip_tpmgr_send_raw() to avoid tdata gets destroyed prematurely.
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3813 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip/src/pjsip/sip_util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pjsip/src/pjsip/sip_util.c b/pjsip/src/pjsip/sip_util.c index bdf8fe6a..f5d360c3 100644 --- a/pjsip/src/pjsip/sip_util.c +++ b/pjsip/src/pjsip/sip_util.c @@ -1390,6 +1390,9 @@ static void send_raw_resolver_callback( pj_status_t status, pj_assert(addr->count != 0); + /* Avoid tdata destroyed by pjsip_tpmgr_send_raw(). */ + pjsip_tx_data_add_ref(sraw_data->tdata); + data_len = sraw_data->tdata->buf.cur - sraw_data->tdata->buf.start; status = pjsip_tpmgr_send_raw(pjsip_endpt_get_tpmgr(sraw_data->endpt), addr->entry[0].type, |