Release tizen_2.0_beta
[framework/connectivity/connman.git] / src / detect.c
index f239d85..39ab06a 100644 (file)
@@ -2,7 +2,7 @@
  *
  *  Connection Manager
  *
- *  Copyright (C) 2007-2009  Intel Corporation. All rights reserved.
+ *  Copyright (C) 2007-2010  Intel Corporation. All rights reserved.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 2 as
@@ -47,9 +47,26 @@ static void detect_newlink(unsigned short type, int index,
                                        unsigned flags, unsigned change)
 {
        struct connman_device *device;
+       enum connman_device_type devtype;
 
        DBG("type %d index %d", type, index);
 
+       devtype = __connman_rtnl_get_device_type(index);
+
+       switch (devtype) {
+       case CONNMAN_DEVICE_TYPE_UNKNOWN:
+       case CONNMAN_DEVICE_TYPE_VENDOR:
+       case CONNMAN_DEVICE_TYPE_WIMAX:
+       case CONNMAN_DEVICE_TYPE_BLUETOOTH:
+       case CONNMAN_DEVICE_TYPE_CELLULAR:
+       case CONNMAN_DEVICE_TYPE_GPS:
+               return;
+       case CONNMAN_DEVICE_TYPE_ETHERNET:
+       case CONNMAN_DEVICE_TYPE_WIFI:
+       case CONNMAN_DEVICE_TYPE_GADGET:
+               break;
+       }
+
        device = find_device(index);
        if (device != NULL)
                return;
@@ -92,17 +109,9 @@ static struct connman_rtnl detect_rtnl = {
 
 int __connman_detect_init(void)
 {
-       int err;
-
        DBG("");
 
-       err = connman_rtnl_register(&detect_rtnl);
-       if (err < 0)
-               return err;
-
-       connman_rtnl_send_getlink();
-
-       return 0;
+       return connman_rtnl_register(&detect_rtnl);
 }
 
 void __connman_detect_cleanup(void)