[gnome-bluetooth] lib: Fix signature of org.bluez.Agent1.DisplayPasskey method



commit 8cb094504745c6640fecc935c344e4420a493246
Author: Jian-Ding Chen <tim chen119 canonical com>
Date:   Fri Nov 28 13:56:31 2014 +1300

    lib: Fix signature of org.bluez.Agent1.DisplayPasskey method
    
    This would cause devices that require this method to be unable to connect
    (e.g. keyboards).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=740829

 lib/bluetooth-agent.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/lib/bluetooth-agent.c b/lib/bluetooth-agent.c
index a645621..1f4b060 100644
--- a/lib/bluetooth-agent.c
+++ b/lib/bluetooth-agent.c
@@ -51,7 +51,7 @@ static const gchar introspection_xml[] =
 "    <method name='DisplayPasskey'>"
 "      <arg type='o' name='device' direction='in'/>"
 "      <arg type='u' name='passkey' direction='in'/>"
-"      <arg type='y' name='entered' direction='in'/>"
+"      <arg type='q' name='entered' direction='in'/>"
 "    </method>"
 "    <method name='DisplayPinCode'>"
 "      <arg type='o' name='device' direction='in'/>"
@@ -167,7 +167,7 @@ static gboolean bluetooth_agent_request_passkey(BluetoothAgent *agent,
 }
 
 static gboolean bluetooth_agent_display_passkey(BluetoothAgent *agent,
-                       const char *path, guint passkey, guint8 entered,
+                       const char *path, guint passkey, guint16 entered,
                                                GDBusMethodInvocation *invocation)
 {
        BluetoothAgentPrivate *priv = BLUETOOTH_AGENT_GET_PRIVATE(agent);
@@ -388,9 +388,9 @@ handle_method_call (GDBusConnection       *connection,
        } else if (g_strcmp0 (method_name, "DisplayPasskey") == 0) {
                const char *path;
                guint32 passkey;
-               guint8 entered;
+               guint16 entered;
 
-               g_variant_get (parameters, "(&ouy)", &path, &passkey, &entered);
+               g_variant_get (parameters, "(&ouq)", &path, &passkey, &entered);
                bluetooth_agent_display_passkey (agent, path, passkey, entered, invocation);
        } else if (g_strcmp0 (method_name, "DisplayPinCode") == 0) {
                const char *path;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]