[wifi-direct]:Fixed SVACE Issue 52/62852/2 accepted/tizen/common/20160322.150948 accepted/tizen/ivi/20160323.012713 accepted/tizen/mobile/20160323.012618 accepted/tizen/tv/20160323.012634 accepted/tizen/wearable/20160323.012653 submit/tizen/20160322.084344
authorManeesh Jain <maneesh.jain@samsung.com>
Sat, 19 Mar 2016 09:48:26 +0000 (05:48 -0400)
committermaneesh jain <maneesh.jain@samsung.com>
Sat, 19 Mar 2016 09:50:52 +0000 (02:50 -0700)
Description: Replace strok() to strok_r()

Change-Id: I7364574b218e9a484e4acc93d474f2b6c468f1a7
Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
src/wifi-direct-client-proxy.c

index 68ff765..37777aa 100755 (executable)
@@ -1177,13 +1177,13 @@ static char **get_service_list(char *services, unsigned int *count)
                        g_free(pos2);
                        return NULL;
                }
-               pos2 = strtok (pos2,",\n");
+               pos2 = strtok_r (pos2,",\n", &saveptr);
                while (pos2 != NULL) {
                        char *s = strchr(pos2, ' ');
                        if (s) {
                                *s = '\0';
                                result[i++] = strdup(pos2);
-                               pos2 = strtok (NULL, ",\n");
+                               pos2 = strtok_r (NULL, ",\n", &saveptr);
                        }
                }
        }