Fix the unexpected slave object deleteing.
authorSung-jae Park <nicesj.park@samsung.com>
Fri, 5 Dec 2014 10:39:11 +0000 (19:39 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Fri, 5 Dec 2014 10:43:54 +0000 (19:43 +0900)
commitc5e12269e1b8a6524588712c2f2bba7446f48013
tree720f9d25396a2d73b6353c277cfe6dc059a75bfe
parentd891e8f7846ec00040f335c1ef3c72d95d38e65d
Fix the unexpected slave object deleteing.

1. slave_deactivate function should not release the slave object directly even though it has ZERO instances.

2. slave_deactivate function is changed to static one.
   It only used in slave_life.c file.
   so I specify its scope to slave_life.c file.

3. Do not deactivate the slave again if it is already deactivated.
   So before call the deactivate function, check its states whether it is activated or not

[model] Redwood,Kiran,B3(Wearable)
[binary_type] AP
[customer] Docomo/Orange/ATT/Open
[issue#] N/A
[problem]
[cause]
[solution]
[team] HomeTF
[request]
[horizontal_expansion]

Change-Id: I6fa8025201a7e9e141a8a3a9e81148122c65682c
include/slave_life.h
src/slave_life.c