[sr-dev] git:master: uac(k): set type for tm callback

Daniel-Constantin Mierla miconda at gmail.com
Sun Jan 24 22:00:54 CET 2010


Module: sip-router
Branch: master
Commit: 3476f0ca4d1431eeee2244383b568a10409367bf
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3476f0ca4d1431eeee2244383b568a10409367bf

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Sun Jan 24 19:43:09 2010 +0100

uac(k): set type for tm callback

- requires to be TMCB_LOCAL_COMPLETED

---

 modules_k/uac/uac_send.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/modules_k/uac/uac_send.c b/modules_k/uac/uac_send.c
index 6e26b4d..9a1f2b9 100644
--- a/modules_k/uac/uac_send.c
+++ b/modules_k/uac/uac_send.c
@@ -383,10 +383,14 @@ int uac_req_send(struct sip_msg *msg, char *s1, char *s2)
 	uac_r.method = &_uac_req.s_method;
 	uac_r.headers = (_uac_req.s_hdrs.len <= 0) ? NULL : &_uac_req.s_hdrs;
 	uac_r.body = (_uac_req.s_body.len <= 0) ? NULL : &_uac_req.s_body;
-	uac_r.cb  = (_uac_req.onreply > 0) ? uac_send_tm_callback : NULL;
-	/* Callback function */
-	uac_r.cbp = (_uac_req.onreply > 0) ? (void*)(long)_uac_req.onreply : 0;
-	/* Callback parameter */
+	if(_uac_req.onreply > 0)
+	{
+		uac_r.cb_flags = TMCB_LOCAL_COMPLETED;
+		/* Callback function */
+		uac_r.cb  = uac_send_tm_callback;
+		/* Callback parameter */
+		uac_r.cbp = (void*)(long)_uac_req.onreply;
+	}
 	ret = tmb.t_request(&uac_r,  /* UAC Req */
 						&_uac_req.s_ruri,        /* Request-URI */
 						(_uac_req.s_turi.len<=0)?&_uac_req.s_ruri:&_uac_req.s_turi, /* To */




More information about the sr-dev mailing list