diff options
-rw-r--r-- | pjsip-apps/src/pjsua/pjsua_app.c | 1 | ||||
-rw-r--r-- | pjsip-apps/src/samples/pjsip-perf.c | 3 | ||||
-rw-r--r-- | pjsip/src/pjsip/sip_util_statefull.c | 6 |
3 files changed, 7 insertions, 3 deletions
diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c index 268eb502..28bbb427 100644 --- a/pjsip-apps/src/pjsua/pjsua_app.c +++ b/pjsip-apps/src/pjsua/pjsua_app.c @@ -1762,7 +1762,6 @@ static void send_request(char *cstr_method, const pj_str_t *dst_uri) status = pjsip_endpt_send_request(endpt, tdata, -1, NULL, NULL); if (status != PJ_SUCCESS) { pjsua_perror(THIS_FILE, "Unable to send request", status); - pjsip_tx_data_dec_ref(tdata); return; } } diff --git a/pjsip-apps/src/samples/pjsip-perf.c b/pjsip-apps/src/samples/pjsip-perf.c index c53a337b..e9d5f2f5 100644 --- a/pjsip-apps/src/samples/pjsip-perf.c +++ b/pjsip-apps/src/samples/pjsip-perf.c @@ -1402,7 +1402,8 @@ static pj_status_t submit_job(void) app_perror(THIS_FILE, "Error sending stateful request", status); //should have been reported by tsx_completion_cb(). //report_completion(701); - pjsip_tx_data_dec_ref(tdata); + //No longer necessary (r777) + //pjsip_tx_data_dec_ref(tdata); } return status; } diff --git a/pjsip/src/pjsip/sip_util_statefull.c b/pjsip/src/pjsip/sip_util_statefull.c index d211af93..133dce32 100644 --- a/pjsip/src/pjsip/sip_util_statefull.c +++ b/pjsip/src/pjsip/sip_util_statefull.c @@ -106,7 +106,11 @@ PJ_DEF(pj_status_t) pjsip_endpt_send_request( pjsip_endpoint *endpt, PJ_TODO(IMPLEMENT_TIMEOUT_FOR_SEND_REQUEST); - return pjsip_tsx_send_msg(tsx, NULL); + status = pjsip_tsx_send_msg(tsx, NULL); + if (status != PJ_SUCCESS) + pjsip_tx_data_dec_ref(tdata); + + return status; } |