- if (conn && dbus_connection_send_with_reply(conn, adapterMsg, &call, -1) ) {
- g_debug ("Getting the properties");
- dbus_pending_call_set_notify(call, get_properties_cb, NULL, NULL);
- dbus_pending_call_block(call);
- dbus_pending_call_unref(call);
+ if (conn) {
+ DBusMessage *msg;
+
+ dbus_error_init (&error);
+ msg = dbus_connection_send_with_reply_and_block (conn, adapterMsg, -1, &error);
+ if (msg) {
+ g_debug ("Getting the properties");
+ get_properties_cb (msg);
+ dbus_message_unref (msg);
+ }
+ dbus_connection_unref (conn);