summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
Diffstat (limited to 'hcid')
-rw-r--r--hcid/dbus-security.c10
-rw-r--r--hcid/passkey-agent.c6
2 files changed, 3 insertions, 13 deletions
diff --git a/hcid/dbus-security.c b/hcid/dbus-security.c
index 022d32fd..ae93aadf 100644
--- a/hcid/dbus-security.c
+++ b/hcid/dbus-security.c
@@ -865,7 +865,6 @@ static void confirm_agent_reply(DBusPendingCall *call, void *user_data)
pin_code_reply_cp pr;
DBusMessage *message;
DBusError err;
- dbus_bool_t result;
int len;
/* steal_reply will always return non-NULL since the callback
@@ -883,17 +882,12 @@ static void confirm_agent_reply(DBusPendingCall *call, void *user_data)
}
dbus_error_init(&err);
- if (!dbus_message_get_args(message, &err,
- DBUS_TYPE_BOOLEAN, &result,
- DBUS_TYPE_INVALID)) {
- error("Wrong passkey reply signature: %s", err.message);
+ if (!dbus_message_get_args(message, &err, DBUS_TYPE_INVALID)) {
+ error("Wrong confirm reply signature: %s", err.message);
dbus_error_free(&err);
goto fail;
}
- if (result == FALSE)
- goto fail;
-
len = strlen(req->pin);
set_pin_length(&req->sba, len);
diff --git a/hcid/passkey-agent.c b/hcid/passkey-agent.c
index 731f6611..b5aecc84 100644
--- a/hcid/passkey-agent.c
+++ b/hcid/passkey-agent.c
@@ -111,7 +111,6 @@ static DBusHandlerResult confirm_message(DBusConnection *conn,
{
DBusMessage *reply;
const char *path, *address, *value;
- dbus_bool_t result;
if (!passkey)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
@@ -123,16 +122,13 @@ static DBusHandlerResult confirm_message(DBusConnection *conn,
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
- result = strcmp(value, passkey) == 0 ? TRUE : FALSE;
-
reply = dbus_message_new_method_return(msg);
if (!reply) {
fprintf(stderr, "Can't create reply message\n");
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
- dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN, &result,
- DBUS_TYPE_INVALID);
+ dbus_message_append_args(reply, DBUS_TYPE_INVALID);
dbus_connection_send(conn, reply, NULL);