diff options
author | Bartłomiej Piotrowski <b@bpiotrowski.pl> | 2015-11-09 12:11:12 +0100 |
---|---|---|
committer | Bartłomiej Piotrowski <b@bpiotrowski.pl> | 2015-11-09 12:11:12 +0100 |
commit | 37cca00fbe335d8c84d772d4ea3323fa204bcd71 (patch) | |
tree | 4275e1265c2a7cccc64e76beb2d5161b1818d2ca /community/gnome-bluetooth/udev-hwdb.patch | |
parent | f27f694e518010617995ede72357067f1f9a6525 (diff) | |
download | aports-37cca00fbe335d8c84d772d4ea3323fa204bcd71.tar.bz2 aports-37cca00fbe335d8c84d772d4ea3323fa204bcd71.tar.xz |
main/gnome-bluetooth: move to community
Diffstat (limited to 'community/gnome-bluetooth/udev-hwdb.patch')
-rw-r--r-- | community/gnome-bluetooth/udev-hwdb.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/community/gnome-bluetooth/udev-hwdb.patch b/community/gnome-bluetooth/udev-hwdb.patch new file mode 100644 index 0000000000..3fd7cae67c --- /dev/null +++ b/community/gnome-bluetooth/udev-hwdb.patch @@ -0,0 +1,46 @@ +diff --git a/lib/pin.c b/lib/pin.c +index 61e87ab..fa05599 100644 +--- a/lib/pin.c ++++ b/lib/pin.c +@@ -40,11 +40,12 @@ + char * + oui_to_vendor (const char *oui) + { ++ char *vendor = NULL; ++#if HAVE_UDEV_HWDB_NEW + struct udev *udev; + struct udev_hwdb *hwdb; + struct udev_list_entry *list, *l; + char *modalias; +- char *vendor = NULL; + + if (oui == NULL || + strlen (oui) < 8) +@@ -81,7 +82,7 @@ bail: + g_clear_pointer (&modalias, g_free); + g_clear_pointer (&hwdb, udev_hwdb_unref); + g_clear_pointer (&udev, udev_unref); +- ++#endif + return vendor; + } + +@@ -207,7 +208,7 @@ get_pincode_for_device (guint type, + data.confirm = TRUE; + + tmp_vendor = oui_to_vendor (address); +- data.vendor = g_ascii_strdown (tmp_vendor, -1); ++ data.vendor = g_ascii_strdown (tmp_vendor ? tmp_vendor : "unknown", -1); + g_free (tmp_vendor); + + ctx = g_markup_parse_context_new (&parser, 0, &data, NULL); +@@ -227,7 +228,8 @@ get_pincode_for_device (guint type, + + g_debug ("Got pin '%s' (max digits: %d, confirm: %d) for device '%s' (type: %s address: %s, vendor: %s)", + data.ret_pin, data.max_digits, data.confirm, +- name ? name : "", bluetooth_type_to_string (type), address, data.vendor); ++ name ? name : "", bluetooth_type_to_string (type), address, ++ data.vendor ? data.vendor : "unknown"); + + g_free (data.vendor); + |