summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-01-06 15:37:57 -0500
committerSimo Sorce <idra@samba.org>2009-01-06 15:45:00 -0500
commited5d21a3e977fbb48a61ee48ef6edd14bc28aeff (patch)
treeecd0115caf06b1674331f820c72dfcbccaf2b815
parentf58882d0104391ce589b1ecbbcc5164002bbb173 (diff)
downloadsssd-ed5d21a3e977fbb48a61ee48ef6edd14bc28aeff.tar.gz
sssd-ed5d21a3e977fbb48a61ee48ef6edd14bc28aeff.tar.bz2
sssd-ed5d21a3e977fbb48a61ee48ef6edd14bc28aeff.zip
SBUS messages with no reply (or no immediate reply) would incorrectly report DBUS_HANDLER_NOT_YET_HANDLED. This would cause SBUS to report NOT_IMPLEMENTED to the calling function.
The message_handler will now check the return code of the method call to determine which reply to send, instead of relying on the presence of a reply message.
-rw-r--r--server/sbus/sssd_dbus_connection.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/sbus/sssd_dbus_connection.c b/server/sbus/sssd_dbus_connection.c
index 497f5010..33f751bd 100644
--- a/server/sbus/sssd_dbus_connection.c
+++ b/server/sbus/sssd_dbus_connection.c
@@ -507,7 +507,7 @@ DBusHandlerResult sbus_message_handler(DBusConnection *conn,
for (i = 0; ctx->method_ctx->methods[i].method != NULL; i++) {
if (strcmp(method, ctx->method_ctx->methods[i].method) == 0) {
ret = ctx->method_ctx->methods[i].fn(message, ctx, &reply);
- /* FIXME: check error */
+ if (ret != EOK) return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
break;
}
}
@@ -521,8 +521,7 @@ DBusHandlerResult sbus_message_handler(DBusConnection *conn,
dbus_message_unref(reply);
}
- return reply ? DBUS_HANDLER_RESULT_HANDLED :
- DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+ return DBUS_HANDLER_RESULT_HANDLED;
}
/* Adds a new D-BUS path message handler to the connection