GAsyncResult* res,
gpointer user_data) {
_W("OnResultReceived()");
+ GDBusConnection* conn = reinterpret_cast<GDBusConnection*>(source_object);
+ GError* err = nullptr;
+ GDBusMessage* reply = g_dbus_connection_send_message_with_reply_finish(conn,
+ res, &err);
+ if (err != nullptr) {
+ if (err->code == G_IO_ERROR_CANCELLED) {
+ _E("G_IO_ERROR_CANCELLED");
+ g_error_free(err);
+ return;
+ }
+ }
+
auto* ptr = static_cast<std::weak_ptr<FdBroker>*>(user_data);
auto broker = ptr->lock();
if (broker == nullptr) {
}
IEventWatcher* watcher = broker->watcher_;
- GDBusConnection* conn = reinterpret_cast<GDBusConnection*>(source_object);
- GError* err = nullptr;
- GDBusMessage* reply = g_dbus_connection_send_message_with_reply_finish(conn,
- res, &err);
if (reply == nullptr) {
if (err) {
- if (err->code == G_IO_ERROR_CANCELLED)
- _E("IO error cancelled");
- else
- _E("Error(%s) occurs", err->message);
+ _E("Error(%s) occurs", err->message);
g_error_free(err);
} else {
_E("g_dbus_connection_send_message_with_reply_finish() is failed");
}
+
watcher->OnPortDisconnected();
return;
}