summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2015-08-07 16:57:46 +0200
committerJakub Hrozek <jhrozek@redhat.com>2015-09-01 11:22:59 +0200
commit6c2a29a912f4c995343315f1f70c825ca2200640 (patch)
tree1b365c4234768aa2555fc006da66bfcc72a6283b /src
parent46e36286953de4e5af5e4289b90a529929bdd17c (diff)
downloadsssd-6c2a29a912f4c995343315f1f70c825ca2200640.tar.gz
sssd-6c2a29a912f4c995343315f1f70c825ca2200640.tar.xz
sssd-6c2a29a912f4c995343315f1f70c825ca2200640.zip
sbus: Initialize errno if constructing message fails and add debug messages
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/sbus/sssd_dbus_request.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sbus/sssd_dbus_request.c b/src/sbus/sssd_dbus_request.c
index 6a012f1c6..888a0eeb5 100644
--- a/src/sbus/sssd_dbus_request.c
+++ b/src/sbus/sssd_dbus_request.c
@@ -333,6 +333,9 @@ struct tevent_req *sbus_get_sender_id_send(TALLOC_CTX *mem_ctx,
goto immediate;
}
+ DEBUG(SSSDBG_TRACE_INTERNAL,
+ "Looking for identity of sender [%s]\n", sender);
+
key.type = HASH_KEY_STRING;
key.str = discard_const(sender);
ret = hash_lookup(conn->clients, &key, &value);
@@ -379,6 +382,7 @@ struct tevent_req *sbus_get_sender_id_send(TALLOC_CTX *mem_ctx,
DBUS_TYPE_STRING, &sender,
DBUS_TYPE_INVALID);
if (!dbret) {
+ ret = ERR_INTERNAL;
goto immediate;
}
@@ -445,6 +449,7 @@ static void sbus_get_sender_id_done(DBusPendingCall *pending, void *ptr)
DBUS_TYPE_UINT32, &uid,
DBUS_TYPE_INVALID);
if (!dbret) {
+ DEBUG(SSSDBG_CRIT_FAILURE, "Could not parse reply!\n");
ret = EIO;
goto done;
}
@@ -457,6 +462,7 @@ static void sbus_get_sender_id_done(DBusPendingCall *pending, void *ptr)
value.ul = state->uid;
ret = hash_enter(state->conn->clients, &key, &value);
if (ret != HASH_SUCCESS) {
+ DEBUG(SSSDBG_CRIT_FAILURE, "Could not add key to hash table!\n");
ret = EIO;
goto done;
}