Happy new year
[pazpar2-moved-to-github.git] / src / sel_thread.c
index 6ce0f2a..1aca81a 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Pazpar2.
-   Copyright (C) 2006-2010 Index Data
+   Copyright (C) 2006-2012 Index Data
 
 Pazpar2 is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -24,7 +24,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "sel_thread.h"
 #include <yaz/log.h>
 #include <yaz/nmem.h>
+#if HAVE_UNISTD_H
 #include <unistd.h>
+#endif
+#ifdef WIN32
+#include <winsock2.h>
+#endif
 #include <stdlib.h>
 #include <yaz/thread_create.h>
 #include <yaz/mutex.h>
@@ -94,7 +99,9 @@ static void *sel_thread_handler(void *vp)
         assert(p->input_queue);
         work_this = queue_remove_last(&p->input_queue);
         input_queue_length--;
+#if 0
         yaz_log(YLOG_DEBUG, "input queue length after pop: %d", input_queue_length);
+#endif
         assert(work_this);
 
         yaz_mutex_leave(p->mutex);
@@ -213,7 +220,9 @@ void sel_thread_add(sel_thread_t p, void *data)
     work_p->next = p->input_queue;
     p->input_queue = work_p;
     input_queue_length++;
+#if 0
     yaz_log(YLOG_DEBUG, "sel_thread_add: Input queue length after push: %d", input_queue_length);
+#endif
     yaz_cond_signal(p->input_data);
     yaz_mutex_leave(p->mutex);
 }