]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
Second try: Bugfix in eventbuilding: when master stream had lost a trigger sequence...
authorhadaq <hadaq>
Tue, 9 Aug 2011 14:56:08 +0000 (14:56 +0000)
committerhadaq <hadaq>
Tue, 9 Aug 2011 14:56:08 +0000 (14:56 +0000)
Workaround with a delayed pop of master stream queue.

Try: Added free of shared mem and queue, since eb was stuck with previous version...
JAM

hadaq/evtbuild.c

index 9de629c1bc53df10e21e048efa2aa5490f6369c8..885526321da266c54345fb75b03f0ad105f3b3bf 100644 (file)
@@ -1,4 +1,4 @@
-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.148 2011-08-09 11:33:20 hadaq Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.149 2011-08-09 14:56:08 hadaq Exp $";
 
 #define _POSIX_C_SOURCE 199309L
 #define SYSLOG_NAMES
@@ -1310,6 +1310,12 @@ int main(int argc, char *argv[])
                if (popMaster) {
                        /* Regular case: delayed pop of last master stream entry after check ok */
                        HadTuQueue_pop(hadTuQueue[0]);
+                       if (HadTuQueue_empty(hadTuQueue[0])) {
+                               desHadTuQueue(hadTuQueue[0]);
+                               free(hadTuQueue[0]);
+                               hadTuQueue[0] = NULL;
+                               ShmTrans_free(shmTrans[0]);
+                       }
                } else {
                        /* display error and keep last event in hope for later synchronization */
                        sprintf(msglog, "<W> Master message stream has missed trigger sequence nr:%d. Kept subevent nr %d in master queue",