Fix statserv_getcontrol for non-threaded YAZ
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 2 Feb 2005 20:25:37 +0000 (20:25 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 2 Feb 2005 20:25:37 +0000 (20:25 +0000)
src/statserv.c

index 6a685b8..d63e349 100644 (file)
@@ -5,7 +5,7 @@
  * NT threaded server code by
  *   Chas Woodfield, Fretwell Downing Informatics.
  *
- * $Id: statserv.c,v 1.20 2005-02-01 14:46:47 adam Exp $
+ * $Id: statserv.c,v 1.21 2005-02-02 20:25:37 adam Exp $
  */
 
 /**
@@ -988,7 +988,9 @@ statserv_options_block *statserv_getcontrol(void)
     else
        return &control_block;
 #else
-    return current_control_block;
+    if (current_control_block)
+        return current_control_block;
+    return &control_block;
 #endif
 }