OSDN Git Service

Fix clearing svc_cache before the adapter is up
authorJohan Hedberg <johan.hedberg@nokia.com>
Wed, 8 Jul 2009 14:51:10 +0000 (17:51 +0300)
committerJohan Hedberg <johan.hedberg@nokia.com>
Wed, 8 Jul 2009 14:51:10 +0000 (17:51 +0300)
src/adapter.c

index bd7166f..289f1f3 100644 (file)
@@ -2269,7 +2269,8 @@ int adapter_update(struct btd_adapter *adapter, uint8_t new_svc)
                return 0;
 
        if (!adapter->up) {
-               adapter->svc_cache = new_svc;
+               if (new_svc)
+                       adapter->svc_cache = new_svc;
                return 0;
        }