This is reverse patch for commit bdc4d983779e37daef71786d046a9602e5886fa5
The usb device mode is dynamic changed, then the gadget technology
need to be created when we have newlink event
---
 src/technology.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/technology.c b/src/technology.c
index b0346a8..bf82b8d 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -1074,10 +1074,10 @@ void __connman_technology_add_interface(enum 
connman_service_type type,
                break;
        }
 
-       connman_info("Adding interface %s [ %s ]", name,
+       connman_info("Create interface %s [ %s ]", name,
                                __connman_service_type2string(type));
 
-       technology = technology_find(type);
+       technology = technology_get(type);
 
        if (technology == NULL || technology->driver == NULL
                        || technology->driver->add_interface == NULL)
@@ -1117,6 +1117,8 @@ void __connman_technology_remove_interface(enum 
connman_service_type type,
 
        if (technology->driver->remove_interface)
                technology->driver->remove_interface(technology, index);
+
+       technology_put(technology);
 }
 
 int __connman_technology_add_device(struct connman_device *device)
-- 
1.7.9.5

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to