From fb3deae51be7ad4e0207b267da8f4096c0e36a0f Mon Sep 17 00:00:00 2001 From: marschap Date: Tue, 9 Oct 2007 16:23:30 +0000 Subject: [PATCH] avoid sending duplicate success result for extended menu_add_item client command --- server/commands/menu_commands.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/server/commands/menu_commands.c b/server/commands/menu_commands.c index 53778f9..f371e9d 100644 --- a/server/commands/menu_commands.c +++ b/server/commands/menu_commands.c @@ -94,7 +94,6 @@ menu_add_item_func(Client *c, int argc, char **argv) Menu *menu = NULL; MenuItem *item; MenuItemType itemtype; - char **argv_set = NULL; debug(RPT_DEBUG, "%s(Client [%d], %s, %s)", __FUNCTION__, c->sock, argv[1], argv[2]); @@ -190,17 +189,17 @@ menu_add_item_func(Client *c, int argc, char **argv) } menu_add_item(menu, item); menuscreen_inform_item_modified(menu); - sock_send_string(c->sock, "success\n"); /* are there any options (starting with '-')? - * - create a temporary argv for menu_set_item() call */ + * call menu_set_item() with a temporarily allocated argv */ if ((argc > 5) || (argv[4][0] == '-')) { // menu_add_item [] // menu_set_item {