From: hadaq Date: Tue, 17 Aug 2010 15:19:39 +0000 (+0000) Subject: Message 'Still waiting for runId' fixed. Sergey. X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=740fd087357b21aacfe17c1cbfaeb508cff895f0;p=daqdata.git Message 'Still waiting for runId' fixed. Sergey. --- diff --git a/hadaq/evtbuild.c b/hadaq/evtbuild.c index 89c534c..111b5a0 100644 --- a/hadaq/evtbuild.c +++ b/hadaq/evtbuild.c @@ -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, " 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, " 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); + } } }