Commit 49bb3030 authored by Pekka Pessi's avatar Pekka Pessi

nua_client.c: fix request message reference counting problem

Ignore-this: ac81944c1c2c095fdc66a51ca857e87c

Internal error response already decreases reference count.

darcs-hash:20090212201137-db55f-81240da04bfc31efd130f809434305792df2fcfd.gz
parent 11bf3e27
......@@ -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,
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment