Fix multiple delimiter 91/134791/2
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 20 Jun 2017 05:05:25 +0000 (14:05 +0900)
committerHwanKyu Jhun <h.jhun@samsung.com>
Tue, 20 Jun 2017 05:11:43 +0000 (05:11 +0000)
- Add carriage return on delimiter

Change-Id: Ib1cf6b6759ed53f3834ca5a616ed61a67326b0ac
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/debugger_info.c
src/launcher_info.c
src/loader_info.c

index a7cdffc..e043e58 100644 (file)
@@ -94,10 +94,10 @@ static void __parse_app_types(struct debugger_info_s *info, char *line)
        char *token;
        char *saveptr = NULL;
 
-       token = strtok_r(line, "\t |\n", &saveptr);
+       token = strtok_r(line, " |\t\r\n", &saveptr);
        while (token) {
                info->app_types = g_list_append(info->app_types, strdup(token));
-               token = strtok_r(NULL, "\t |\n", &saveptr);
+               token = strtok_r(NULL, " |\t\r\n", &saveptr);
        }
 }
 
index d8d9cc2..89a7ccd 100644 (file)
@@ -74,10 +74,10 @@ static void __parse_app_types(struct launcher_info_s *info, char *line)
        char *token;
        char *saveptr = NULL;
 
-       token = strtok_r(line, "\t |\n", &saveptr);
+       token = strtok_r(line, " |\t\r\n", &saveptr);
        while (token) {
                info->app_types = g_list_append(info->app_types, strdup(token));
-               token = strtok_r(NULL, "\t |\n", &saveptr);
+               token = strtok_r(NULL, " |\t\r\n", &saveptr);
        }
 }
 
index b8ffb9a..889ab1d 100644 (file)
@@ -64,7 +64,7 @@ static void __parse_detection_method(loader_info_t *info, char *line)
        char *token;
        char *savedptr;
 
-       token = strtok_r(line, "\t |\n", &savedptr);
+       token = strtok_r(line, " |\t\r\n", &savedptr);
        info->detection_method = 0;
        while (token) {
                if (!strcmp(token, VAL_METHOD_TIMEOUT))
@@ -74,7 +74,7 @@ static void __parse_detection_method(loader_info_t *info, char *line)
                else if (!strcmp(token, VAL_METHOD_DEMAND))
                        info->detection_method |= METHOD_DEMAND;
 
-               token = strtok_r(NULL, "\t |\n", &savedptr);
+               token = strtok_r(NULL, " |\t\r\n", &savedptr);
        }
 
        _D("detection_method:%d", info->detection_method);
@@ -85,10 +85,10 @@ static void __parse_app_types(loader_info_t *info, char *line)
        char *token;
        char *savedptr;
 
-       token = strtok_r(line, "\t |\n", &savedptr);
+       token = strtok_r(line, " |\t\r\n", &savedptr);
        while (token) {
                info->app_types = g_list_append(info->app_types, strdup(token));
-               token = strtok_r(NULL, "\t |\n", &savedptr);
+               token = strtok_r(NULL, " |\t\r\n", &savedptr);
        }
 }