summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:58:10 -0500
committerroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:58:10 -0500
commit02231cd9177ae12053b3dc2248fb6a8bfeb4bdfd (patch)
tree0e6b25e2e2818b63c960755da77fa489a49631c2 /parser.c
parentc76eb9d4b0c7828f147ffc37fa8d327e5303c323 (diff)
added parser mutex lock
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/parser.c b/parser.c
index b5d3a32..c2ba8d3 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 */
@@ -1088,6 +1091,8 @@ void Parser_main (char *raw_in, int interactive_terminal, void(*cbfunc)(gpointer
}
g_free (in);
+
+ g_static_mutex_unlock (&mutex);
}