Hello folks,<div>    I have the following calls:</div><div><br></div><div>               reply = dbus_connection_send_with_reply(conn, msg, &amp;call,</div><div>                                                                              timeout_ms);</div>

<div>               if (reply == TRUE) {</div><div>                             dbus_pending_call_set_notify(call,</div><div>                                                                         callback,</div><div>                                                                         pending,</div>

<div>                                                                         NULL);</div><div>               }</div><div><br></div><div>So I get a reply from the other end (very quickly) and before a pending function can get set in dbus_pending_call_set_notify.</div>

<div>And thus when _dbus_pending_call_complete is called I don&#39;t get the callback because pending-&gt;function is NULL.</div><div><br>This is a race condition and I hit it 50 % of the times depending on how loaded the system is.</div>

<div><br></div><div>Is there a better way to set the pending call ? Am I using it wrongly ?</div><div><br>Thanks</div><div>Jaikumar</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div>