[SR-Users] HEAD: Problems with $$ in xlog

Hugh Waite hugh.waite at crocodile-rcs.com
Thu Jan 17 18:41:57 CET 2013


Hi Klaus,

I have found exactly this problem and fixed it this morning!
My fixes are usually commited by Peter Dunkley who is away on business, 
so I've attached my patch. It's not actually a git diff, but I'm sure 
you can see the required change.

This change came in when the PV cache was introduced.

The change may get pushed over the weekend.

Regards,
Hugh

On 17/01/2013 17:20, Klaus Darilion wrote:
> Hi!
>
> In xlog I used to use $$ to escape the dollar sign to not be 
> interpreted as PV, eg:
>         xlog("L_INFO","    $$ru\n");
>
> Current HEAD gives an error:
>
> ERROR: <core> [pvapi.c:757]: error searching pvar ""
> ERROR: <core> [pvapi.c:961]: wrong char [$/36] in [$] at [0 (0)]
> ERROR: xlog [xlog.c:363]: wrong format[    $$ru#012]
> ERROR: <core> [route.c:1214]: fixing failed (code=-1) at 
> cfg:/etc/kamailio/kamailio.cfg:627
>
> Where there some changes?
>
> Thanks
> Klaus
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


-- 
Hugh Waite
Principal Design Engineer
Crocodile RCS Ltd.

-------------- next part --------------
Index: pvapi.c
===================================================================
--- pvapi.c
+++ pvapi.c
@@ -120,6 +120,10 @@
 		LM_ERR("missing pv marker [%.*s]\n", in->len, in->s);
 		return -1;
 	}
+	if(in->s[1]==PV_MARKER)
+	{
+		return 2;
+	}
 	pcount = 0;
 	if(in->s[1]==PV_LNBRACKET)
 	{


More information about the sr-users mailing list