Hi,<br><br>&nbsp;Im using the following construct to receive and process messages (of course I have set up a match, and filter function).<br>It works well so far.<br>Before I open a connection with dbus_bus_get.<br><br>But If I cancel the loop by setting flag to 0, there are problems.<br>
After doing that I unref the connection with dbus_connection_unref()<br>However after canceling the loop and reconnecting Im not able to receive messages and at the same time<br>I have problems sending messages.<br>Maybe there is a better way to cancel the loop manually?<br>
<br>while(flag){<br>if ( dbus_connection_read_write_dispatch(conn, 500) != TRUE) )<br>&nbsp;break;<br clear="all">}<br><br>A general question:<br>In general&nbsp; the concept of setting up a connection by dbus_bus_get, doing some stuff, sending and receiving messages.<br>
When Im done I call dbus_connection_unref to close the connection.<br><br>After that I can just restart the process, right (setting up connection with dbus_bus_get ...) ?<br>-- <br>Regards,<br>--Codefritz<br><br><br><br>