fix codes for thread safety 97/61697/1 accepted/tizen/common/20160311.201107 accepted/tizen/ivi/20160311.054052 accepted/tizen/mobile/20160311.053950 accepted/tizen/tv/20160311.054014 accepted/tizen/wearable/20160311.054037 submit/tizen/20160310.051224
authorWonnam Jang <wn.jang@samsung.com>
Thu, 10 Mar 2016 02:20:25 +0000 (11:20 +0900)
committerWonnam Jang <wn.jang@samsung.com>
Thu, 10 Mar 2016 02:20:25 +0000 (11:20 +0900)
Change-Id: I0e37e1834494a45aa0932af217660f2facdea2b5
Signed-off-by: Wonnam Jang <wn.jang@samsung.com>
src/vc_elm_core.c

index 84cffeccdc4945d3d838852bc4d38e68fba6adc2..295305608b6d49f69e6baff73686751c70565c5a 100644 (file)
@@ -220,9 +220,10 @@ Eina_Bool _recognize_command(const char *cmd, const char *param1, const char *pa
                }
        }
        if (found) {
+               char *tmp_buf = NULL;
                char *tmp_cmd = strdup(cmd);
-               char *command = strtok(tmp_cmd, " ");
-               char *param = strtok(NULL, "'");
+               char *command = strtok_r(tmp_cmd, " ", &tmp_buf);
+               char *param = strtok_r(NULL, "'", &tmp_buf);
                found->cmd = command;
 
                VC_ELM_LOG_DBG("unwrapping %s %s for %s", param1, param2, _get_ui_object_name(found->obj));