Improve thread-safety in NNTP
authorRicardo Mones <ricardo@mones.org>
Tue, 9 Sep 2014 23:15:37 +0000 (01:15 +0200)
committerRicardo Mones <ricardo@mones.org>
Fri, 19 Sep 2014 12:05:58 +0000 (14:05 +0200)
src/etpan/nntp-thread.c

index 7d02b048b5830e473497eaf38dc4fa91759fb8c2..ac5d2100ec2ece0c1647d61768ea1cdc3b51ecac 100644 (file)
@@ -58,9 +58,6 @@ static chash * session_hash = NULL;
 static guint thread_manager_signal = 0;
 static GIOChannel * io_channel = NULL;
 
-static void (*previous_stream_logger)(int direction,
-    const char * str, size_t size);
-
 static void nntp_logger(int direction, const char * str, size_t size) 
 {
        gchar *buf;
@@ -270,7 +267,9 @@ static void threaded_run(Folder * folder, void * param, void * result,
 {
        struct etpan_thread_op * op;
        struct etpan_thread * thread;
-       
+       void (*previous_stream_logger)(int direction,
+               const char * str, size_t size);
+
        nntp_folder_ref(folder);
 
        op = etpan_thread_op_new();