aboutsummaryrefslogtreecommitdiff
path: root/libsylph
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2009-09-29 07:49:30 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2009-09-29 07:49:30 +0000
commita75654a326dadebacc229762eb01f5e7c65b1ccc (patch)
tree384933406e40aa0eae55368420af4b1391a568fc /libsylph
parent1ff05553158408570a7cd548fdcdf4ec7be07f5d (diff)
made GDK locks reentrant, and made LogWindow thread-safe.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2259 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph')
-rw-r--r--libsylph/socket.c9
-rw-r--r--libsylph/utils.c11
2 files changed, 9 insertions, 11 deletions
diff --git a/libsylph/socket.c b/libsylph/socket.c
index 5b2ea960..1dc9448d 100644
--- a/libsylph/socket.c
+++ b/libsylph/socket.c
@@ -1329,11 +1329,10 @@ static gpointer sock_connect_async_func(gpointer data)
{
SockConnectData *conn_data = (SockConnectData *)data;
- g_print("sock_connect_async_func: connect\n");
conn_data->sock = sock_connect(conn_data->hostname, conn_data->port);
conn_data->flag = 1;
- g_print("sock_connect_async_func: connected\n");
+ debug_print("sock_connect_async_func: connected\n");
g_main_context_wakeup(NULL);
return GINT_TO_POINTER(0);
@@ -1380,13 +1379,13 @@ gint sock_connect_async_wait(gint id, SockInfo **sock)
return -1;
}
- g_print("sock_connect_async_wait: waiting thread\n");
+ debug_print("sock_connect_async_wait: waiting thread\n");
while (conn_data->flag == 0)
event_loop_iterate();
- g_print("sock_connect_async_wait: flagged\n");
+ debug_print("sock_connect_async_wait: flagged\n");
g_thread_join(conn_data->thread);
- g_print("sock_connect_async_wait: thread exited\n");
+ debug_print("sock_connect_async_wait: thread exited\n");
*sock = conn_data->sock;
diff --git a/libsylph/utils.c b/libsylph/utils.c
index c0664488..fb9f30be 100644
--- a/libsylph/utils.c
+++ b/libsylph/utils.c
@@ -3875,16 +3875,15 @@ static gpointer execute_command_line_async_func(gpointer data)
CmdData *cmd_data = (CmdData *)data;
gchar **argv;
- g_print("execute_command_line_async_func\n");
argv = strsplit_with_quote(cmd_data->cmdline, " ", 0);
cmd_data->status = execute_sync(argv);
g_strfreev(argv);
- g_print("execute_command_line_async_func: exec done.\n");
+ debug_print("execute_command_line_async_func: exec done: %s\n",
+ cmd_data->cmdline);
cmd_data->flag = 1;
g_main_context_wakeup(NULL);
- g_print("execute_command_line_async_func: exiting\n");
return GINT_TO_POINTER(0);
}
@@ -3909,13 +3908,13 @@ gint execute_command_line_async_wait(const gchar *cmdline)
if (!thread)
return -1;
- g_print("execute_command_line_async_wait: waiting thread\n");
+ debug_print("execute_command_line_async_wait: waiting thread\n");
while (data.flag == 0)
event_loop_iterate();
- g_print("execute_command_line_async_wait: flagged\n");
+ debug_print("execute_command_line_async_wait: flagged\n");
g_thread_join(thread);
- g_print("execute_command_line_async_wait: thread exited\n");
+ debug_print("execute_command_line_async_wait: thread exited\n");
return data.status;
}