Introduce additional glib leveraged binary comparison in UDEV logic.

Thu, 30 Jun 2011 14:00:35 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 30 Jun 2011 14:00:35 +0200
changeset 20
2ff1f58715ce
parent 19
3374f578f080
child 21
6bb708a2265f

Introduce additional glib leveraged binary comparison in UDEV logic.

ofono/ofono-hs2330_2.patch file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/ofono/ofono-hs2330_2.patch	Thu Jun 30 14:00:35 2011 +0200
     1.3 @@ -0,0 +1,29 @@
     1.4 +This patch is assembled according to discussions on #ofono
     1.5 +irc.freenode.net and mailing list thread 'Problem detecting/using wwan0
     1.6 +modem' in June 2011, after comprehensive guidance from Denis KENZIOR.
     1.7 +
     1.8 +Denis had already modified plugins/udev.c in git commit
     1.9 +6a2847f7aba5d84b06940ee29300d4b6fd31d682 to correct detection of
    1.10 +OEM Ericsson F3607gw modems relabeled by HP and sold as HS2330.
    1.11 +Because some (or all?) HS2330 modems contain flawed text identifiers
    1.12 +containing strange (probably erroneous) binary sequences in place of
    1.13 +the ASCII space '\x20' character, the previous commit is incomplete.
    1.14 +The following logic detects the modem properly, by comparing binary
    1.15 +data as well as ASCII text values.
    1.16 +
    1.17 +Michael Schloh von Bennewitz
    1.18 +http://michael.schloh.com/
    1.19 +30 June 2011
    1.20 +
    1.21 +Index: plugins/udev.c
    1.22 +diff -Nau plugins/udev.c.orig plugins/udev.c
    1.23 +--- plugins/udev.c.orig	2011-06-30 13:42:29.279704948 +0200
    1.24 ++++ plugins/udev.c	2011-06-30 13:43:48.117205221 +0200
    1.25 +@@ -134,6 +134,7 @@
    1.26 + 			(g_str_has_suffix(desc, "Minicard Data Modem") ||
    1.27 + 			g_str_has_suffix(desc, "Mini-Card Data Modem") ||
    1.28 + 			g_str_has_suffix(desc, "Module Data Modem") ||
    1.29 ++			g_str_has_suffix(desc, "Module\xc2\xa0""Data Modem") ||
    1.30 + 			g_str_has_suffix(desc, "Broadband Data Modem"))) {
    1.31 + 		devnode = udev_device_get_devnode(udev_device);
    1.32 + 		ofono_modem_set_string(modem, DATA_DEVICE, devnode);

mercurial