]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/system/ArbiterP.nc
Rearranged order of unconfigure with power down via ResourceDefaultOwner
[tinyos-2.x.git] / tos / system / ArbiterP.nc
index fd278ce3d8ecdb5dfea3cdb7d9c4f74b72ad8272..8933f304fca4506567c1e52f0099a8e331c7bbb6 100644 (file)
@@ -112,13 +112,14 @@ implementation {
           reqResId = call Queue.dequeue();
           state = RES_GRANTING;
           post grantedTask();
+          call ResourceConfigure.unconfigure[id]();
         }
         else {
           resId = default_owner_id;
           state = RES_CONTROLLED;
+          call ResourceConfigure.unconfigure[id]();
           signal ResourceDefaultOwner.granted();
         }
-        call ResourceConfigure.unconfigure[id]();
       }
     }
     return FAIL;