* updates for new mu_str escaping function, better error handling

This commit is contained in:
djcb
2012-03-30 19:02:46 +03:00
parent 2a105f1612
commit e7e84ed08a
3 changed files with 15 additions and 7 deletions

View File

@ -216,7 +216,7 @@ cmd_from_string (const char *str)
static Cmd
parse_line (const gchar *line, GSList **args)
parse_line (const gchar *line, GSList **args, GError **err)
{
Cmd cmd;
GSList *lst;
@ -226,7 +226,7 @@ parse_line (const gchar *line, GSList **args)
if (!line)
return CMD_IGNORE;
lst = mu_str_esc_to_list (line);
lst = mu_str_esc_to_list (line, err);
if (!lst)
return CMD_INVALID;
@ -1014,9 +1014,12 @@ mu_cmd_server (MuStore *store, MuConfig *opts, GError **err)
GError *my_err;
line = my_readline (MU_PROMPT);
cmd = parse_line (line, &args);
cmd = parse_line (line, &args, err);
g_free (line);
if (cmd == CMD_INVALID)
my_err = NULL;
if (!handle_command (cmd, store, query, args, &my_err))
g_clear_error (&my_err);