diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/main.c | 11 |
2 files changed, 16 insertions, 0 deletions
@@ -1,5 +1,10 @@ 2009-12-28 + * src/main.c: lock_socket_input_cb(): added missing lock on I/O + callback (fixes freeze on remote commands). + +2009-12-28 + * src/update_check.[ch] src/main.c src/prefs_common_dialog.c @@ -1351,6 +1351,10 @@ static gboolean lock_socket_input_cb(GIOChannel *source, GIOCondition condition, gint fd, sock; gchar buf[BUFFSIZE]; +#if USE_THREADS + gdk_threads_enter(); +#endif + fd = g_io_channel_unix_get_fd(source); sock = fd_accept(fd); fd_gets(sock, buf, sizeof(buf)); @@ -1410,6 +1414,9 @@ static gboolean lock_socket_input_cb(GIOChannel *source, GIOCondition condition, strretchomp(buf); if (strlen(buf) < 6 || buf[4] != ' ') { fd_close(sock); +#if USE_THREADS + gdk_threads_leave(); +#endif return TRUE; } open_message(buf + 5); @@ -1420,6 +1427,10 @@ static gboolean lock_socket_input_cb(GIOChannel *source, GIOCondition condition, fd_close(sock); +#if USE_THREADS + gdk_threads_leave(); +#endif + return TRUE; } |