From a61fbeb78de56d89665f242172eddb1b43350183 Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Tue, 14 Aug 2012 15:22:09 -0400 Subject: null units inside the loop, for compound commands --- parser.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/parser.c b/parser.c index ce90c9f..26aa1b7 100644 --- a/parser.c +++ b/parser.c @@ -503,7 +503,6 @@ void Parser_main (char *raw_in, int interactive_terminal, void(*cbfunc)(gpointer int space_found; /* if true, a space was found. parameter may follow */ int parameter_found; /* if true, there is a parameter at the end of the command string */ char parameter[max_input_word_length]; /* identified parameter */ - char *units = NULL; int semicolon_found; /* to break up lines */ int units_found; /* text found after parameter must be units */ int i; /* counter */ @@ -540,6 +539,10 @@ void Parser_main (char *raw_in, int interactive_terminal, void(*cbfunc)(gpointer /* examine each letter in the string until EOS */ while (in[in_pos] != 0) { + gchar *units = NULL; + gchar *response = NULL; + gchar *error_response = NULL; + channel=-1; with_id_code=0; space_found = 0; @@ -644,8 +647,6 @@ void Parser_main (char *raw_in, int interactive_terminal, void(*cbfunc)(gpointer /* add end of tokens marker (0) */ int error_num=OK; - gchar *response = NULL; - gchar *error_response = NULL; if (parameter_found) { units_found = Parser_get_unit(parameter,&units); -- cgit