diff options
-rw-r--r-- | parser.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); } |