<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    in this particular case, it crashed because the ctx parameter is
    null for rpc_add() and fix_delayed_reply_ctx() functions as noted in
    frame 1 and 0.<br>
    <br>
    Can you check if the afferent field is not null in your function
    publish() after the call of pua_send_publish()?<br>
    <br>
    Also, can you check to see if the pointer to the delayed context is
    the same in publish() as well as in publish_callback()?<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 17/11/14 09:45, Juha Heinanen wrote:<br>
    </div>
    <blockquote cite="mid:21609.46491.841889.699163@tutpro.com"
      type="cite">
      <pre wrap="">i have tried to implement pua_rpc module in order to get rid of pua_mi
module.  unfortunately pua.publish crashes when it executes the callback
function.  i have not been able to figure out why.  rpc callback system
is heavily using void typed variables and parameters with casts, which
means that compiler cannot help in finding the bug.

my current code of the module is enclosed.  pua.publish causes this kind
of crash during callback execution:

(gdb) where
#0  0xb3e9a513 in fix_delayed_reply_ctx (ctx=0x0) at xmlrpc.c:664
#1  0xb3e9c3ff in rpc_add (ctx=0x0, fmt=0xb3944868 "dS") at xmlrpc.c:1095
#2  0xb393c6ce in publish_callback (hentity=0xb48e0db8, reply=0xffffffff) at pua_rpc.c:98
#3  0xb397fc82 in run_pua_callbacks (hentity=0xb48e0db8, msg=0xffffffff) at pua_callback.h:72
#4  0xb3984074 in publ_cback_func (t=0xb48e0fb4, type=1024, ps=0xbfbaa85c) at send_publish.c:436
#5  0xb69cfc09 in run_trans_callbacks_internal (cb_lst=0xb48e0ff4, type=1024, trans=0xb48e0fb4, 
    params=0xbfbaa85c) at t_hooks.c:290
#6  0xb69cfd1a in run_trans_callbacks (type=1024, trans=0xb48e0fb4, req=0x0, rpl=0xffffffff, 
    code=408) at t_hooks.c:317
#7  0xb6a0815e in local_reply (t=0xb48e0fb4, p_msg=0xffffffff, branch=0, msg_status=408, 
    cancel_data=0xbfbaa958) at t_reply.c:2120
#8  0xb6a1ca05 in fake_reply (t=0xb48e0fb4, branch=0, code=408) at timer.c:350
#9  0xb6a1ce61 in final_response_handler (r_buf=0xb48e1110, t=0xb48e0fb4) at timer.c:527
#10 0xb6a1cefa in retr_buf_handler (ticks=98494515, tl=0xb48e1124, p=0x1f40) at timer.c:585
#11 0x08216c78 in slow_timer_main () at timer.c:1145
#12 0x080df91b in main_loop () at main.c:1687
#13 0x080e4956 in main (argc=17, argv=0xbfbaae14) at main.c:2568

what should i do with the code?  commit it to git in case someone would
later be able to figure out where the bug is or just through it to
waste bin?

-- juha

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
sr-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </body>
</html>