summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:22:46 -0500
committerroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:22:46 -0500
commit2f2aa1e39d806c2e3ffa1ecf6cd8d8f49cb25326 (patch)
treeab1b4bd775b31aabd4edc59836b5c61cad9f1cd7 /parser.c
parent107629c5e9f97dd04443bb341ed1edf4c3e813c8 (diff)
cal_in_progress too fancy, just rely on mutex to delay commands
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/parser.c b/parser.c
index 48d4825..6ad0892 100644
--- a/parser.c
+++ b/parser.c
@@ -628,6 +628,9 @@ static gchar* filter_input (gchar *raw_in)
void Parser_main (char *raw_in, int interactive_terminal, void(*cbfunc)(gpointer, gchar *), gpointer user_data)
{
+ static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
+ g_static_mutex_lock (&mutex);
+
int in_pos; /* this identifies the single character of in being processed */
int command_depth; /* how many command words have been parsed */
int old_command_depth; /* save this if in case of a compound message */
@@ -644,22 +647,6 @@ void Parser_main (char *raw_in, int interactive_terminal, void(*cbfunc)(gpointer
int compound_message; /* this indicates that at least one semicolon has been found, so */
/* the message is a compound one */
-
- // Commands cause error if calibration in progress.
- if (globals.Sys.cal_in_progress) {
- gchar *error_msg = NULL;
- queue_error_from_parser(&error_msg, Cal_In_Progress);
- if (interactive_terminal) {
- (*cbfunc)(user_data, error_msg);
- }
- g_free (error_msg);
- return;
- }
-
-
- static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
- g_static_mutex_lock (&mutex);
-
int is_query;
int command_type; /* combination of is_query, parameter_found, and units_found */