[sr-dev] rpc->scan in ctl
Daniel-Constantin Mierla
miconda at gmail.com
Sun Jan 6 15:21:42 CET 2013
Hello,
one problem is that you declare the variables where to read to as str*
and then give to the rpc->scan the pointer to the variable, so it is str**.
You have to declare the variable as str and give the pointer to it to
rpc->scan
str urip;
if (rpc->scan(c, ".S", &urip) != 1)
Cheers,
Daniel
On 12/23/12 6:36 PM, Olle E. Johansson wrote:
> 23 dec 2012 kl. 08:38 skrev "Olle E. Johansson" <oej at edvina.net>:
>
>> Hi!
>>
>> In my RPC adventures, I came upon a problem that I fail to fix.
>>
>> Like many other functions, rpc->scan is used to get a str from the command line (using kamcmd).
>> If I understand right, kamcmd use binrpc in the ctl module.
>>
>> The original function in MI checks the length of the string given as an argument. If I do that,
>> like checking contactp->len then the length is a few million characters... I can read the
>> actual string, so that part of the data seems right.
>>
>> Anyone that experienced the same?
> This is what I get:
>
> 3(75826) DEBUG: permissions [mi.c:268]: Basename permissions length 7564911
> 3(75826) DEBUG: permissions [mi.c:273]: URI sip:oej at edvina.net length 1769366629
> 3(75826) DEBUG: permissions [mi.c:278]: Contact sip:192.168.40.19 length 775435825 size 7
>
> length is str->len size is sizeof(str->s)
>
> I have bin digging through librpc and binrpc in the ctl module and fail to get it.
>
> /O
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
More information about the sr-dev
mailing list