summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-10-27 16:49:43 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-10-27 16:49:43 +0000
commit9323de9fb2af3db457516fc0d9b94da9db112e80 (patch)
tree7d49025397bd06a27d8d8b31d19088fe151488f2 /hcid
parent6493a5e58c8effb15460446c7039ef7725cb2b9f (diff)
Send emtpy reply for cancel and release methods
Diffstat (limited to 'hcid')
-rw-r--r--hcid/auth-agent.c32
-rw-r--r--hcid/passkey-agent.c32
2 files changed, 64 insertions, 0 deletions
diff --git a/hcid/auth-agent.c b/hcid/auth-agent.c
index c0ab46c5..6ca07ff1 100644
--- a/hcid/auth-agent.c
+++ b/hcid/auth-agent.c
@@ -100,12 +100,30 @@ static DBusHandlerResult authorize_message(DBusConnection *conn,
static DBusHandlerResult cancel_message(DBusConnection *conn,
DBusMessage *msg, void *data)
{
+ DBusMessage *reply;
+
+ 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_INVALID);
+
+ dbus_connection_send(conn, reply, NULL);
+
+ dbus_connection_flush(conn);
+
+ dbus_message_unref(reply);
+
return DBUS_HANDLER_RESULT_HANDLED;
}
static DBusHandlerResult release_message(DBusConnection *conn,
DBusMessage *msg, void *data)
{
+ DBusMessage *reply;
+
if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_INVALID)) {
fprintf(stderr, "Invalid arguments for Release method");
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
@@ -116,6 +134,20 @@ static DBusHandlerResult release_message(DBusConnection *conn,
__io_terminated = 1;
+ 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_INVALID);
+
+ dbus_connection_send(conn, reply, NULL);
+
+ dbus_connection_flush(conn);
+
+ dbus_message_unref(reply);
+
return DBUS_HANDLER_RESULT_HANDLED;
}
diff --git a/hcid/passkey-agent.c b/hcid/passkey-agent.c
index 29706310..731f6611 100644
--- a/hcid/passkey-agent.c
+++ b/hcid/passkey-agent.c
@@ -146,12 +146,30 @@ static DBusHandlerResult confirm_message(DBusConnection *conn,
static DBusHandlerResult cancel_message(DBusConnection *conn,
DBusMessage *msg, void *data)
{
+ DBusMessage *reply;
+
+ 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_INVALID);
+
+ dbus_connection_send(conn, reply, NULL);
+
+ dbus_connection_flush(conn);
+
+ dbus_message_unref(reply);
+
return DBUS_HANDLER_RESULT_HANDLED;
}
static DBusHandlerResult release_message(DBusConnection *conn,
DBusMessage *msg, void *data)
{
+ DBusMessage *reply;
+
if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_INVALID)) {
fprintf(stderr, "Invalid arguments for passkey Release method");
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
@@ -162,6 +180,20 @@ static DBusHandlerResult release_message(DBusConnection *conn,
__io_terminated = 1;
+ 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_INVALID);
+
+ dbus_connection_send(conn, reply, NULL);
+
+ dbus_connection_flush(conn);
+
+ dbus_message_unref(reply);
+
return DBUS_HANDLER_RESULT_HANDLED;
}