--- xbms_0.30.6/server.c 2003-02-23 13:12:06.000000000 +0100 +++ server.c 2003-02-23 16:26:52.000000000 +0100 @@ -465,9 +465,10 @@ if (main_config->debug_lvl >= 1) d_log("OPEN\n"); /* Get the argument after comma */ - ptr = strtok(line,","); - ptr = strtok(NULL,","); - + ptr = strstr(line,","); +// ptr = strtok(NULL,","); + if (ptr!=NULL) { + ptr++; fileName = (char *)malloc(strlen(ptr)+1); // targetfileName = (char *)malloc(strlen(TARGET_PATH)+strlen(ptr)+2); @@ -508,7 +509,8 @@ } } else d_log("Illegal string in filename: %s\n", fileName); - } + } else d_log("Illegal filename: %s\n", fileName); + } /***************************** READ A PART OF A FILE ****************/ if (strcmp(cmd,"READ") == 0) @@ -635,10 +637,11 @@ d_log("CurDirectory: %s\n",main_config->current_path); /* Get the character after the comma, if any */ - ptr = strtok(line,","); - if ((ptr = strtok(NULL,","))) { + ptr = strstr(line,","); + if (ptr!=NULL) { /* Check the command */ - if (!strcmp(ptr,"BACK")) { + ptr++; + if (!strcmp(ptr,"BACK")) { /* We can't go back if the current path is empty ! */ if (main_config->current_path!=NULL && main_config->current_path[0] != 0) { fileName = (char *)malloc(strlen(main_config->current_path)+1);