Hi Eduardo,
+ struct connman_technology *technology;
Useless var, see below.
for (list = driver_list; list; list = list-next) {
if (list-data == driver)
@@ -1254,8 +1255,11 @@ int connman_technology_driver_register(struct
connman_technology_driver *driver)
exist:
if (driver-type == CONNMAN_SERVICE_TYPE_P2P) {
- if (!technology_get(CONNMAN_SERVICE_TYPE_P2P))
+ technology = technology_get(CONNMAN_SERVICE_TYPE_P2P);
+ if (!technology)
Keep the code as before, you are not fixing anything here.
return -ENOMEM;
+ else if (driver-probe)
+ driver-probe(technology);
}
If wifi is disabled, it gets soft-rfkill: at this point p2p technology
should be unregistered, thus no longer exist in the technology list.
It seems you have found a p2p technology refcount issue.
I instrumented a bit and it's then visible:
connmand[10575]: src/technology.c:connman_technology_driver_unregister()
Unregistering driver 0x6b92c0 name p2p
connmand[10575]: src/technology.c:technology_find() type 9
connmand[10575]: src/technology.c:technology_put() technology 0x20ef690
- refs 2
When disabling wifi: p2p really should disappear.
Will fix that.
Thanks for testing and finding an issue,
Tomasz
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman