Merge lp:~seb128/unity-control-center/bluetooth-ssp-signature into lp:unity-control-center

Proposed by Sebastien Bacher
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 12831
Merged at revision: 12831
Proposed branch: lp:~seb128/unity-control-center/bluetooth-ssp-signature
Merge into: lp:unity-control-center
Diff against target: 81 lines (+21/-12)
2 files modified
panels/bluetooth/gnome-bluetooth/lib/bluetooth-agent.c (+4/-4)
panels/bluetooth/gnome-bluetooth/wizard/main.c (+17/-8)
To merge this branch: bzr merge lp:~seb128/unity-control-center/bluetooth-ssp-signature
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre Approve
Michael Terry Pending
Review via email: mp+271680@code.launchpad.net

Commit message

[bluetooth] restore the ssp pairing signature fix which was applied to our
gnome-bluetooth package but got discarded by error when updating ucc to the
new bluez version

Description of the change

[bluetooth] restore the ssp pairing signature fix which was applied to our
gnome-bluetooth package but got discarded by error when updating ucc to the
new bluez version

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Yes please! :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'panels/bluetooth/gnome-bluetooth/lib/bluetooth-agent.c'
--- panels/bluetooth/gnome-bluetooth/lib/bluetooth-agent.c 2015-03-03 11:08:17 +0000
+++ panels/bluetooth/gnome-bluetooth/lib/bluetooth-agent.c 2015-09-18 16:47:30 +0000
@@ -51,7 +51,7 @@
51" <method name='DisplayPasskey'>"51" <method name='DisplayPasskey'>"
52" <arg type='o' name='device' direction='in'/>"52" <arg type='o' name='device' direction='in'/>"
53" <arg type='u' name='passkey' direction='in'/>"53" <arg type='u' name='passkey' direction='in'/>"
54" <arg type='y' name='entered' direction='in'/>"54" <arg type='q' name='entered' direction='in'/>"
55" </method>"55" </method>"
56" <method name='DisplayPinCode'>"56" <method name='DisplayPinCode'>"
57" <arg type='o' name='device' direction='in'/>"57" <arg type='o' name='device' direction='in'/>"
@@ -167,7 +167,7 @@
167}167}
168168
169static gboolean bluetooth_agent_display_passkey(BluetoothAgent *agent,169static gboolean bluetooth_agent_display_passkey(BluetoothAgent *agent,
170 const char *path, guint passkey, guint8 entered,170 const char *path, guint passkey, guint16 entered,
171 GDBusMethodInvocation *invocation)171 GDBusMethodInvocation *invocation)
172{172{
173 BluetoothAgentPrivate *priv = BLUETOOTH_AGENT_GET_PRIVATE(agent);173 BluetoothAgentPrivate *priv = BLUETOOTH_AGENT_GET_PRIVATE(agent);
@@ -388,9 +388,9 @@
388 } else if (g_strcmp0 (method_name, "DisplayPasskey") == 0) {388 } else if (g_strcmp0 (method_name, "DisplayPasskey") == 0) {
389 char *path;389 char *path;
390 guint32 passkey;390 guint32 passkey;
391 guint8 entered;391 guint16 entered;
392392
393 g_variant_get (parameters, "(ouy)", &path, &passkey, &entered);393 g_variant_get (parameters, "(ouq)", &path, &passkey, &entered);
394 bluetooth_agent_display_passkey (agent, path, passkey, entered, invocation);394 bluetooth_agent_display_passkey (agent, path, passkey, entered, invocation);
395 g_free (path);395 g_free (path);
396 } else if (g_strcmp0 (method_name, "DisplayPinCode") == 0) {396 } else if (g_strcmp0 (method_name, "DisplayPinCode") == 0) {
397397
=== modified file 'panels/bluetooth/gnome-bluetooth/wizard/main.c'
--- panels/bluetooth/gnome-bluetooth/wizard/main.c 2015-03-03 11:08:17 +0000
+++ panels/bluetooth/gnome-bluetooth/wizard/main.c 2015-09-18 16:47:30 +0000
@@ -442,7 +442,7 @@
442 guint entered,442 guint entered,
443 gpointer user_data)443 gpointer user_data)
444{444{
445 gchar *text, *done, *code;445 gchar *text, *done, *code, *label;
446446
447 display_called = TRUE;447 display_called = TRUE;
448 gtk_assistant_set_current_page (window_assistant, PAGE_SSP_SETUP);448 gtk_assistant_set_current_page (window_assistant, PAGE_SSP_SETUP);
@@ -469,18 +469,27 @@
469469
470 done = g_string_free (str, FALSE);470 done = g_string_free (str, FALSE);
471 } else {471 } else {
472 done = g_strdup ("");472 done = g_strdup_printf("%s", code);
473 }473 }
474474
475 gtk_widget_show (label_pin_help);475 gtk_widget_show (label_ssp_pin);
476476
477 gtk_label_set_markup(GTK_LABEL(label_ssp_pin_help), _("Please enter the following PIN:"));477 if (target_ui_behaviour == PAIRING_UI_KEYBOARD) {
478 text = g_strdup_printf("%s%s", done, code + entered);478 label = g_strdup_printf (_("Please enter the following PIN on '%s' and press “Enter” on the keyboard:"), target_name);
479 text = g_strdup_printf("%s⏎", done);
480 }
481 else {
482 label = g_strdup_printf (_("Please enter the following PIN on '%s':"), target_name);
483 text = g_strdup_printf("%s", done);
484 }
485
486 gtk_label_set_markup(GTK_LABEL(label_ssp_pin_help), label);
479 set_large_label (GTK_LABEL (label_ssp_pin), text);487 set_large_label (GTK_LABEL (label_ssp_pin), text);
480 g_free(text);488 g_free(text);
481489
482 g_free(done);490 g_free(done);
483 g_free(code);491 g_free(code);
492 g_free(label);
484493
485 g_dbus_method_invocation_return_value (invocation, NULL);494 g_dbus_method_invocation_return_value (invocation, NULL);
486}495}

Subscribers

People subscribed via source and target branches