summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-10-16 21:07:19 +0000
committerBenny Prijono <bennylp@teluu.com>2006-10-16 21:07:19 +0000
commit5b85ff054a1b48c5a17cab90edf6bc5bcad87f74 (patch)
tree911d1c4dd71995a3e4e4593a74036409ab28045c
parent58a72d24ec0f82142fd7b7378b11b3e189fc00ea (diff)
FIXED BUG: pjsip_endpt_send_request() SHOULD DELETE THE REQUEST REGARDLESS OF THE STATUS!!!
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@777 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjsip-apps/src/pjsua/pjsua_app.c1
-rw-r--r--pjsip-apps/src/samples/pjsip-perf.c3
-rw-r--r--pjsip/src/pjsip/sip_util_statefull.c6
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;
}