Thu Feb 12 14:11:37 CST 2009 Pekka Pessi <first.last@nokia.com>

* nua_client.c: fix request message reference counting problem
  Ignore-this: ac81944c1c2c095fdc66a51ca857e87c
  
  Internal error response already decreases reference count.



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11948 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2009-02-12 21:13:20 +00:00
parent 0f8297a965
commit 87b2408635
3 changed files with 8 additions and 8 deletions

View File

@ -1 +1 @@
Thu Feb 12 15:11:37 CST 2009
Thu Feb 12 15:13:11 CST 2009

View File

@ -877,7 +877,7 @@ int nua_client_request_sendmsg(nua_client_request_t *cr)
else
error = nua_base_client_request(cr, msg, sip, NULL);
if (error != 0 && error != -2)
if (error == -1)
msg_destroy(msg);
return error;
@ -906,9 +906,9 @@ int nua_base_client_trequest(nua_client_request_t *cr,
/** Send request.
*
* @retval 0 success
* @retval -1 if error occurred, but event has not been sent
* @retval -2 if error occurred, event has not been sent,
* and @a msg has been destroyed
* @retval -1 if error occurred, but event has not been sent,
* and caller has to destroy request message @ msg
* @retval -2 if error occurred, event has not been sent
* @retval >=1 if error event has been sent
*/
int nua_base_client_request(nua_client_request_t *cr, msg_t *msg, sip_t *sip,

View File

@ -71,8 +71,8 @@ typedef struct {
*
* @retval 1 when request has been responded
* @retval 0 when request has been sent
* @retval -1 upon an error (request message has not been destroyed)
* @retval -2 upon an error (request message has been destroyed)
* @retval -1 upon an error (but request message has not been destroyed)
* @retval -2 upon an error
*/
int (*crm_send)(nua_client_request_t *,
msg_t *msg, sip_t *sip,
@ -80,7 +80,7 @@ typedef struct {
/** @a crm_check_restart is called each time when a response is received.
*
* It is used to restart reqquest after responses with method-specific
* It is used to restart request after responses with method-specific
* status code or method-specific way of restarting the request.
*
* @retval 1 when request has been restarted