X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=audiod_command.c;h=332ce85b6b199a44f076e38c4569b38692a020c8;hb=59796673d90ad532d03ebb730f928b2c755fa8b6;hp=35b76b5f6fa277ea2aa55656f557b32ef36b5585;hpb=2ce04a49091712719b8fd60a6c7888258b719db1;p=paraslash.git diff --git a/audiod_command.c b/audiod_command.c index 35b76b5f..332ce85b 100644 --- a/audiod_command.c +++ b/audiod_command.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2012 Andre Noll + * Copyright (C) 2005-2013 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -30,7 +30,7 @@ extern struct sched sched; extern char *stat_item_values[NUM_STAT_ITEMS]; -struct audiod_command audiod_cmds[] = {DEFINE_AUDIOD_CMD_ARRAY}; +static struct audiod_command audiod_cmds[] = {DEFINE_AUDIOD_CMD_ARRAY}; /** Iterate over the array of all audiod commands. */ #define FOR_EACH_COMMAND(c) for (c = 0; audiod_cmds[c].name; c++) @@ -320,7 +320,6 @@ static int com_stat(int fd, int argc, char **argv) if (!strncmp(arg, "-p", 2)) { parser_friendly = 1; b.flags = PBF_SIZE_PREFIX; - continue; } } if (i >= argc) @@ -442,7 +441,7 @@ int handle_connect(int accept_fd, fd_set *rfds) if (ret < 0) goto out; ret = create_argv(buf, "\n", &argv); - if (ret < 0) + if (ret <= 0) goto out; argc = ret; //PARA_INFO_LOG("argv[0]: %s, argc = %d\n", argv[0], argc);