[OpenSIPS-Devel] very minor bug in opensips tm fwd

Kennard_White at logitech.com Kennard_White at logitech.com
Tue Jul 20 03:30:06 CEST 2010



Hi,

I believe there is a minor bug in opensips HEAD in the tm module t_fwd.c.
The function update_uac_dst sets ser_error to one of two options:
E_OUT_OF_MEM or E_NO_SOCKET. This is overwritten by add_uac. The simple one
line fix is:

--- a/modules/tm/t_fwd.c
+++ b/modules/tm/t_fwd.c
@@ -430,7 +430,7 @@ static int add_uac( struct cell *t, struct sip_msg
*request, str *uri,
        t->uac[branch].request.dst.proto = proxy->proto;

        if ( update_uac_dst( request, &t->uac[branch] )!=0) {
-               ret = E_OUT_OF_MEM;
+               ret = ser_error;
                goto error02;
        }

A more elaborate fix might be to not set ser_error at all in update_uac_dst
and just return the error code.

Note that this error condition occurs when a REGISTER Path header has bogus
(unreachable) URI. Unfortunately this is all too easy to do, and having a
useful error message is helpful.

Regards,
Kennard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/devel/attachments/20100719/84fbd453/attachment.htm 


More information about the Devel mailing list