summaryrefslogtreecommitdiffstats
path: root/src/agent.c
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>2008-09-09 15:18:27 -0300
committerVinicius Costa Gomes <vinicius.gomes@openbossa.org>2008-09-09 19:47:14 -0300
commitc0296a9dde463495975140e7fb7f689a347807d6 (patch)
tree8db2fe54052fa2566d0ce365842e96943c104b35 /src/agent.c
parent8b783303433f7c25c2a888034a6da369a7e9a731 (diff)
Cancels the pending request from agent side when receiving a NoReply
Diffstat (limited to 'src/agent.c')
-rw-r--r--src/agent.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/agent.c b/src/agent.c
index e8f9c651..6b7c8d03 100644
--- a/src/agent.c
+++ b/src/agent.c
@@ -285,6 +285,14 @@ static void simple_agent_reply(DBusPendingCall *call, void *user_data)
err.name, err.message);
cb(agent, &err, req->user_data);
+
+ if (dbus_error_has_name(&err, DBUS_ERROR_NO_REPLY)) {
+ agent_cancel(agent);
+ dbus_message_unref(message);
+ dbus_error_free(&err);
+ return;
+ }
+
dbus_error_free(&err);
goto done;
}