diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2014-04-04 11:01:08 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2014-04-04 12:23:44 +0300 |
commit | c9a72eaf64f14a49be71a25715518c5fed4a2201 (patch) | |
tree | 393dc25b1eb4127005446cb35698d21fc527d235 | |
parent | 2bc0c67cb99fe325f948f097813970e6c34f196a (diff) | |
download | connman-c9a72eaf64f14a49be71a25715518c5fed4a2201.tar.gz |
technology: Do not refcount P2P technology as it is dependent on WiFi
P2P technology exists only if WiFi technology exists and it does not own
any devices either. Thus it's unnecessary to refcount it more than once.
Reported by Eduardo Abinader <eduardo.abinader@openbossa.org>
-rw-r--r-- | src/technology.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/technology.c b/src/technology.c index 5a122023..a917a6cd 100644 --- a/src/technology.c +++ b/src/technology.c @@ -1157,7 +1157,8 @@ static struct connman_technology *technology_get(enum connman_service_type type) technology = technology_find(type); if (technology) { - __sync_fetch_and_add(&technology->refcount, 1); + if (type != CONNMAN_SERVICE_TYPE_P2P) + __sync_fetch_and_add(&technology->refcount, 1); return technology; } |