[Serdev] CVS:commitlog: sip_router/modules/textops textops.c sip_router/modules/textops/doc textops_user.sgml

Maxim Sobolev sobomax at portaone.com
Wed Jul 7 18:25:22 UTC 2004


Andrei Pelinescu-Onciul wrote:

> On Jul 07, 2004 at 17:24, Maxim Sobolev <sobomax at portaone.com> wrote:
> 
>>>>+>--uri.user.s[uri.user.len] = '\0';$
>>>>+>--result=subst_str(uri.user.s, msg, se); /* pkg malloc'ed result */
>>>>
>>>>uri.user.s can be NULL (if the uri has no user part) so you need an if:
>>>>
>>>>if (uri.user.s) {...
>>>>}
>>>
>>>
>>>OK, it makes sense.
>>
>>Actually I think that just testing for len == 0 and returning if true is 
>>not quite sufficient, since in this case username should be considered 
>>to be an empty string, so that it is still possible to rewrite it using 
>>$ or ^ regexp operator.
> 
> 
> Hmm, so you want
> s/.*/user/
> to match on sip:foo.bar and change it to sip:user at foo.bar instead of
> leaving it alone?

Gray zone, I know, but that would be logical behaviour, IMO.

-Maxim




More information about the Serdev mailing list