|
@@ -285,8 +285,8 @@ int parse_text_buffer(struct videohub_data *data, char *cmd_buffer) {
|
285
|
285
|
return parse_command(data, cmd_buffer);
|
286
|
286
|
// Split commands and parse them one by one
|
287
|
287
|
int ok_commands = 0;
|
288
|
|
- char *bcopy = xstrdup(cmd_buffer);
|
289
|
|
- char *newcmd, *cmd = bcopy;
|
|
288
|
+ char *buf_copy = xstrdup(cmd_buffer);
|
|
289
|
+ char *newcmd, *cmd = buf_copy;
|
290
|
290
|
while(1) {
|
291
|
291
|
newcmd = strstr(cmd, "\n\n"); // Find next command
|
292
|
292
|
if (!newcmd) {
|
|
@@ -299,7 +299,7 @@ int parse_text_buffer(struct videohub_data *data, char *cmd_buffer) {
|
299
|
299
|
ok_commands++;
|
300
|
300
|
cmd = newcmd + 2; // Advance cmd to the next command
|
301
|
301
|
}
|
302
|
|
- free(bcopy);
|
|
302
|
+ free(buf_copy);
|
303
|
303
|
return ok_commands;
|
304
|
304
|
}
|
305
|
305
|
|