Validate the hw_acceleration
authorSung-jae Park <nicesj.park@samsung.com>
Tue, 25 Nov 2014 11:40:11 +0000 (20:40 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Tue, 25 Nov 2014 11:40:11 +0000 (20:40 +0900)
[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: I0fef3864de311813eda6409634e827958c4abe5e

src/server.c
src/slave_life.c

index 89cdef2..79c336c 100644 (file)
@@ -69,8 +69,6 @@
 #define ACCESS_TYPE_PREV 2
 #define ACCESS_TYPE_OFF 3
 
-#define SLAVE_HW_ACCELERATION_NONE "none"
-
 static struct info {
     int info_fd;
     int client_fd;
@@ -6330,7 +6328,7 @@ static struct packet *slave_hello(pid_t pid, int handle, const struct packet *pa
                    DbgPrint("Slave pkgname is invalid, ABI is replaced with '%s'(default)\n", abi);
                }
 
-               slave = slave_create(slavename, 1, abi, pkgname, 0, SLAVE_HW_ACCELERATION_NONE);
+               slave = slave_create(slavename, 1, abi, pkgname, 0, NULL);
                if (!slave) {
                    ErrPrint("Failed to create a new slave for %s\n", slavename);
                    goto out;
index e21b649..15efc54 100644 (file)
@@ -221,14 +221,16 @@ static inline struct slave_node *create_slave_node(const char *name, int is_secu
        return NULL;
     }
 
-    slave->hw_acceleration = strdup(hw_acceleration);
-    if (!slave->hw_acceleration) {
-       ErrPrint("Heap: %s\n", strerror(errno));
-       DbgFree(slave->pkgname);
-       DbgFree(slave->abi);
-       DbgFree(slave->name);
-       DbgFree(slave);
-       return NULL;
+    if (slave->hw_acceleration) {
+       slave->hw_acceleration = strdup(hw_acceleration);
+       if (!slave->hw_acceleration) {
+           ErrPrint("Heap: %s\n", strerror(errno));
+           DbgFree(slave->pkgname);
+           DbgFree(slave->abi);
+           DbgFree(slave->name);
+           DbgFree(slave);
+           return NULL;
+       }
     }
 
     slave->secured = is_secured;