]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
Message 'Still waiting for runId' fixed. Sergey.
authorhadaq <hadaq>
Tue, 17 Aug 2010 15:19:39 +0000 (15:19 +0000)
committerhadaq <hadaq>
Tue, 17 Aug 2010 15:19:39 +0000 (15:19 +0000)
hadaq/evtbuild.c

index 89c534c1429e85068965b13e9963ae95323509ad..111b5a0cdf648c272f6bface163f99e4288693bc 100644 (file)
@@ -1,4 +1,4 @@
-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.128 2010-08-17 09:52:04 hadaq Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.129 2010-08-17 15:19:39 hadaq Exp $";
 
 #define _POSIX_C_SOURCE 199309L
 #define SYSLOG_NAMES
@@ -1175,16 +1175,17 @@ unsigned long getRunId(TheArgs *my)
                        sleep(1);
                } else {
 
-                       t = time(NULL);
-                       dT = t - t0;
-                       if (dT > 2) {
-                               storeLogInfo(my, "<I> getRunId: Still waiting for runId from EPICS IOC...");
-                               printf("Still waiting for runId from EPICS IOC...\n");
-                               t0 = t;
-                       }
+                       if (myRunId == 0) {
+                               t = time(NULL);
+                               dT = t - t0;
+                               if (dT > 2) {
+                                       storeLogInfo(my, "<I> getRunId: Still waiting for runId from EPICS IOC...");
+                                       printf("Still waiting for runId from EPICS IOC...\n");
+                                       t0 = t;
+                               }
 
-                       if (myRunId == 0)
                                nanosleep(&tv, NULL);
+                       }
                }
 
        }