Don't look for threading functions if it's built without threads
authoraland <aland>
Wed, 30 Jul 2003 20:08:01 +0000 (20:08 +0000)
committeraland <aland>
Wed, 30 Jul 2003 20:08:01 +0000 (20:08 +0000)
src/main/radiusd.c

index 898441d..789f751 100644 (file)
@@ -835,6 +835,13 @@ int main(int argc, char *argv[])
                }
 
                if (need_reload) {
+#if HAVE_PTHREAD_H
+                       /*
+                        *      Threads: wait for all threads to stop
+                        *      processing before re-loading the
+                        *      config, so we don't pull the rug out
+                        *      from under them.
+                        */
                        int max_wait = 0;
                        for(;;) {
                                /*
@@ -850,6 +857,7 @@ int main(int argc, char *argv[])
                                sleep(1);
                                max_wait++;
                        }
+#endif
                        if (read_mainconfig(TRUE) < 0) {
                                exit(1);
                        }
@@ -930,8 +938,8 @@ int main(int argc, char *argv[])
                        /*
                         *  Receive the packet.
                         */
-                       if (sig_hup_block != FALSE) {
-                         continue;
+                       if (sig_hup_block) {
+                               continue;
                        }
                        packet = rad_recv(fd);
                        if (packet == NULL) {