[sr-dev] git:master: tmx: be sure From header is parsed before accessing the tag

Daniel-Constantin Mierla miconda at gmail.com
Tue Aug 19 18:24:49 CEST 2014


Thanks, it helped to figure out the issue. I pushed a patch for it.

Cheers,
Daniel

On 19/08/14 17:53, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>> Can you get the output for:
>>
>> p _tmx_proc_ptran
>> p it
>> p *_tmx_proc_ptran
>> p *it
>> p slotid
>> p _tmx_ptran_table[slotid].plist
> here you go,
>
> -- juha
>
> (gdb) where
> #0  0x00007f446c3a11db in tmx_check_pretran (msg=0x7f447a2bad88)
>      at tmx_pretran.c:306
> #1  0x00007f446c39edeb in w_t_precheck_trans (msg=0x7f447a2bad88, p1=0x0,
>      p2=0x0) at tmx_mod.c:709
> #2  0x000000000041c6b3 in do_action (h=0x7fff80ddb7c0, a=0x7f44799e62c8,
>      msg=0x7f447a2bad88) at action.c:1107
> #3  0x0000000000425233 in run_actions (h=0x7fff80ddb7c0, a=0x7f44799e62c8,
>      msg=0x7f447a2bad88) at action.c:1607
> #4  0x000000000042591f in run_actions_safe (h=0x7fff80ddc070,
>      a=0x7f44799e62c8, msg=0x7f447a2bad88) at action.c:1672
> #5  0x00000000004cb56f in rval_get_int (h=0x7fff80ddc070, msg=0x7f447a2bad88,
>      i=0x7fff80ddbee0, rv=0x7f44799e6558, cache=0x0) at rvalue.c:924
> #6  0x00000000004ce227 in rval_expr_eval_int (h=0x7fff80ddc070,
>      msg=0x7f447a2bad88, res=0x7fff80ddbee0, rve=0x7f44799e6550)
>      at rvalue.c:1918
> #7  0x000000000041c3d6 in do_action (h=0x7fff80ddc070, a=0x7f44799e6ed0,
>      msg=0x7f447a2bad88) at action.c:1083
> #8  0x0000000000425233 in run_actions (h=0x7fff80ddc070, a=0x7f44799da228,
>      msg=0x7f447a2bad88) at action.c:1607
> #9  0x00000000004259e7 in run_top_route (a=0x7f44799da228, msg=0x7f447a2bad88,
>      c=0x0) at action.c:1693
> #10 0x00000000004ab495 in receive_msg (
>      buf=0x1808390 "SUBSCRIBE sip:jh at test.tutpro.com SIP/2.0\r\nVia: SIP/2.0/TCP 192.98.102.30:5054;rport;branch=z9hG4bKiaufrvmr\r\nMax-Forwards: 69\r\nTo: <sip:jh at test.tutpro.com>\r\nFrom: \"Test\" <sip:test at test.tutpro.com>;tag="...,
>      len=423, rcv_info=0x7f44708ec3d8) at receive.c:213
> #11 0x0000000000533b6e in receive_tcp_msg (
>      tcpbuf=0x7f44708ec6a8 "SUBSCRIBE sip:jh at test.tutpro.com SIP/2.0\r\nVia: SIP/2.0/TCP 192.98.102.30:5054;rport;branch=z9hG4bKiaufrvmr\r\nMax-Forwards: 70\r\nTo: <sip:jh at test.tutpro.com>\r\nFrom: \"Test\" <sip:test at test.tutpro.com>;tag="..., len=423, rcv_info=0x7f44708ec3d8, con=0x7f44708ec3c0) at tcp_read.c:1232
> #12 0x0000000000534a20 in tcp_read_req (con=0x7f44708ec3c0,
>      bytes_read=0x7fff80ddc4d0, read_flags=0x7fff80ddc4c8) at tcp_read.c:1387
> #13 0x00000000005363cf in handle_io (fm=0x7f447a39a1a8, events=8193, idx=-1)
>      at tcp_read.c:1617
> #14 0x000000000052edd9 in io_wait_loop_epoll (h=0x8e4200, t=2, repeat=0)
>      at io_wait.h:1092
> #15 0x0000000000536ce2 in tcp_receive_loop (unix_sock=57) at tcp_read.c:1728
> #16 0x000000000052929f in tcp_init_children () at tcp_main.c:4970
> #17 0x0000000000470d9d in main_loop () at main.c:1704
> #18 0x00000000004739ae in main (argc=17, argv=0x7fff80ddc998) at main.c:2554
> (gdb) p _tmx_proc_ptran
> $1 = (pretran_t *) 0x7f4470902b40
> (gdb) p it
> $2 = (pretran_t *) 0x7f447090b348
> (gdb) p *_tmx_proc_ptran
> $3 = {hid = 297596497, linked = 0, callid = {
>      s = 0x7f447090e8d0 "oustdxpwjhuelsz at siika", len = 21}, ftag = {
>      s = 0x7f447090e8e6 "gxvqz", len = 5}, cseqnum = {s = 0x7f447090e8ec "924",
>      len = 3}, cseqmet = {s = 0x7f447090e8f0 "SUBSCRIBE", len = 9},
>    cseqmetid = 64, vbranch = {s = 0x7f447090e8fa "z9hG4bKiaufrvmr", len = 15},
>    dbuf = {s = 0x7f447090e8d0 "oustdxpwjhuelsz at siika", len = 256}, pid = 2972,
>    next = 0x7f447090b348, prev = 0x0}
> (gdb) p *it
> $4 = {hid = 895696017, linked = 0, callid = {
>      s = 0x7f447090b408 "twmddnijfvofemw at siika", len = 21}, ftag = {
>      s = 0x7f447090b41e "kxsyz", len = 5}, cseqnum = {s = 0x7f447090b424 "238",
>      len = 3}, cseqmet = {s = 0x7f447090b428 "REGISTER", len = 8},
>    cseqmetid = 32, vbranch = {s = 0x7f447090b431 "z9hG4bKbxicxuqa", len = 15},
>    dbuf = {s = 0x7f447090b408 "twmddnijfvofemw at siika", len = 256}, pid = 2933,
>    next = 0x7f447090b348, prev = 0x7f4470902b40}
> (gdb) p slotid
> $5 = 1
> (gdb) p _tmx_ptran_table[slotid].plist
> $6 = (pretran_t *) 0x7f4470902b40
> (gdb)

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA




More information about the sr-dev mailing list