[gnome-bluetooth] wizard: Remove Wiimote PIN handling
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] wizard: Remove Wiimote PIN handling
- Date: Thu, 22 Sep 2011 17:23:34 +0000 (UTC)
commit 3f79a2a73100fa66a8eedddb55d95b4b58a01850
Author: Bastien Nocera <hadess hadess net>
Date: Thu Sep 22 17:49:42 2011 +0100
wizard: Remove Wiimote PIN handling
It's now handled directly in bluez 4.96 and later,
with the "wiimote" plugin. See commit
1106efd440bf678c1422a9247b8c27f2259ac94b.
wizard/main.c | 64 ------------------------------------------
wizard/pin-code-database.xml | 7 ----
2 files changed, 0 insertions(+), 71 deletions(-)
---
diff --git a/wizard/main.c b/wizard/main.c
index 8797e5f..d34bd3e 100644
--- a/wizard/main.c
+++ b/wizard/main.c
@@ -684,62 +684,6 @@ set_user_pincode (GtkWidget *button)
}
}
-static char *
-get_default_adapter_address (void)
-{
- BluetoothClient *client;
- GtkTreeModel *model;
- GtkTreeIter iter;
- gboolean cont;
-
- client = bluetooth_client_new ();
- model = bluetooth_client_get_adapter_model (client);
- cont = gtk_tree_model_get_iter_first(model, &iter);
-
- while (cont == TRUE) {
- char *address;
- gboolean is_default;
-
- gtk_tree_model_get (model, &iter,
- BLUETOOTH_COLUMN_ADDRESS, &address,
- BLUETOOTH_COLUMN_DEFAULT, &is_default, -1);
-
- if (is_default == TRUE) {
- g_object_unref (model);
- g_object_unref (client);
- return address;
- }
-
- g_free (address);
-
- cont = gtk_tree_model_iter_next (model, &iter);
- }
-
- g_object_unref (model);
- g_object_unref (client);
-
- return NULL;
-}
-
-static char *
-pin_from_adapter (const char *bdaddr)
-{
- char **items;
- GString *s;
- char *ret;
- int i;
-
- items = g_strsplit (bdaddr, ":", -1);
- g_assert (g_strv_length (items) == 6);
- s = g_string_new ("$");
- for (i = 5; i >= 0; i--)
- g_string_append (s, items[i]);
- g_strfreev (items);
- ret = g_string_free (s, FALSE);
-
- return ret;
-}
-
void
select_device_changed (BluetoothChooser *selector,
const char *address,
@@ -792,14 +736,6 @@ select_device_changed (BluetoothChooser *selector,
pincode = g_strndup(target_pincode, max_digits);
else
pincode = g_strdup(target_pincode);
- } else if (g_str_equal (pincode, "WII")) {
- char *default_adapter;
-
- g_free (pincode);
- default_adapter = get_default_adapter_address ();
- pincode = pin_from_adapter (default_adapter);
- g_free (default_adapter);
- automatic_pincode = TRUE;
} else if (target_ssp == FALSE) {
automatic_pincode = TRUE;
}
diff --git a/wizard/pin-code-database.xml b/wizard/pin-code-database.xml
index 391746b..11c5bb5 100644
--- a/wizard/pin-code-database.xml
+++ b/wizard/pin-code-database.xml
@@ -27,10 +27,6 @@
connected to and marked as trusted. This is for devices such as mice
and joypads where there is no encryption
- The special "WII" pin means that the device will use the host's Bluetooth
- address to compute the pin code as explained at:
- http://wiibrew.org/wiki/Wiimote#Sync_Button
-
If a device can use a random PIN but is limited in the number of digits that
can be entered, then set the "pin" attribute should be set to "max:X" where X
is the maximum number of digits, for example max:4 for 4 digits.
@@ -76,9 +72,6 @@
<!-- Lenovo Ideacenter remote -->
<device oui="00:08:1B:" name="lenovo_RC" pin="0000"/>
- <!-- Wiimote -->
- <device name="Nintendo RVL-CNT-01" pin="WII"/>
-
<!-- GPS devices -->
<device oui="00:0D:B5:" name="TomTom Wireless GPS MkII" pin="0000"/>
<device oui="00:0D:B5:" name="GPS-GW-005" pin="0000"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]