From 7e090d498e11ae435d973bea44e393a6e42beb3d Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 27 Dec 2008 08:54:35 +0100 Subject: Add basic detection of Option HSO devices --- src/detect.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/detect.c') diff --git a/src/detect.c b/src/detect.c index 85fb077a..f6c66a79 100644 --- a/src/detect.c +++ b/src/detect.c @@ -135,7 +135,7 @@ static void detect_newlink(unsigned short type, int index, struct connman_device *device; gchar *name, *devname; - DBG("index %d", index); + DBG("type %d index %d", type, index); device = find_device(index); if (device != NULL) @@ -171,6 +171,9 @@ static void detect_newlink(unsigned short type, int index, devtype = CONNMAN_DEVICE_TYPE_ETHERNET; close(sk); + } else if (type == ARPHRD_NONE) { + if (g_str_has_prefix(devname, "hso") == TRUE) + devtype = CONNMAN_DEVICE_TYPE_HSO; } if (devtype == CONNMAN_DEVICE_TYPE_UNKNOWN) { @@ -206,7 +209,7 @@ static void detect_dellink(unsigned short type, int index, { struct connman_device *device; - DBG("index %d", index); + DBG("type %d index %d", type, index); device = find_device(index); if (device == NULL) -- cgit v1.2.3