summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
Diffstat (limited to 'hcid')
-rw-r--r--hcid/dbus-adapter.c2
-rw-r--r--hcid/dbus-error.c8
-rw-r--r--hcid/dbus.h1
3 files changed, 10 insertions, 1 deletions
diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c
index 001aa2f3..53b65144 100644
--- a/hcid/dbus-adapter.c
+++ b/hcid/dbus-adapter.c
@@ -1814,7 +1814,7 @@ static gboolean create_bonding_conn_complete(GIOChannel *io, GIOCondition cond,
if (!pdata->bonding->connected)
error_connection_attempt_failed(pdata->bonding->conn, pdata->bonding->rq, ENETDOWN);
else
- error_failed(pdata->bonding->conn, pdata->bonding->rq, EIO);
+ error_authentication_failed(pdata->bonding->conn, pdata->bonding->rq);
goto failed;
}
diff --git a/hcid/dbus-error.c b/hcid/dbus-error.c
index da8d166a..aa7ed5ef 100644
--- a/hcid/dbus-error.c
+++ b/hcid/dbus-error.c
@@ -186,6 +186,14 @@ DBusHandlerResult error_authentication_canceled(DBusConnection *conn, DBusMessag
dbus_message_new_error(msg, ERROR_INTERFACE ".AuthenticationCanceled",
"Authentication Canceled"));
}
+
+DBusHandlerResult error_authentication_failed(DBusConnection *conn, DBusMessage *msg)
+{
+ return send_reply_and_unref(conn,
+ dbus_message_new_error(msg, ERROR_INTERFACE ".AuthenticationFailed",
+ "Authentication failed"));
+}
+
DBusHandlerResult error_discover_in_progress(DBusConnection *conn, DBusMessage *msg)
{
return error_in_progress(conn, msg, "Discover in progress");
diff --git a/hcid/dbus.h b/hcid/dbus.h
index 6c7dc015..e754622e 100644
--- a/hcid/dbus.h
+++ b/hcid/dbus.h
@@ -177,6 +177,7 @@ DBusHandlerResult error_bonding_does_not_exist(DBusConnection *conn, DBusMessage
DBusHandlerResult error_bonding_in_progress(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_bonding_not_in_progress(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_authentication_canceled(DBusConnection *conn, DBusMessage *msg);
+DBusHandlerResult error_authentication_failed(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_discover_in_progress(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_connect_in_progress(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_connect_not_in_progress(DBusConnection *conn, DBusMessage *msg);