Changeset 10185


Ignore:
Timestamp:
02/28/11 15:58:52 (14 years ago)
Author:
ogrimm
Message:
Fixed bug due to static keyword in FAD::ReadLoop()
Location:
fact/FADctrl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fact/FADctrl/FADBoard.cc

    r10164 r10185  
    316316void FADBoard::ReadLoop() {
    317317
    318   static char Buffer[READ_BUFFER_SIZE];
    319   static unsigned int Pos = 0, Temp;
     318  char Buffer[READ_BUFFER_SIZE];
     319  unsigned int Pos = 0, Temp;
    320320  const PEVNT_HEADER *Header = (PEVNT_HEADER *) Buffer;
    321321  ssize_t Result;
     
    384384          memmove(Buffer, Buffer+Temp, Pos-Temp);
    385385          Pos -= Temp;
    386           m->PrintMessage("Removed %d bytes because of start_package_flag not found\n", Temp);
     386          m->PrintMessage("Removed %d bytes because of start_package_flag not found for %s\n", Temp, Name);
    387387          continue;
    388388        }
     
    467467          if (PrevStatus.BoardID != Status.BoardID) {
    468468                DIM_ID->updateService(&Status.BoardID, sizeof(Status.BoardID));
    469           } 
     469          }
     470         
     471          // Inform event thread of new data
     472          string Message = string("EVENT")+Name;
     473          if (write(m->Pipe[1], Message.data(), Message.size()) == -1) {
     474                m->Message(m->ERROR, "write() to Pipe[1] failed in class FADBoard (%s)", strerror(errno));
     475                m->ExitRequest = true;
     476          }         
    470477        }
    471478        else m->PrintMessage("End package flag incorrect, removing corrupt event\n");
    472 
    473         // Inform event thread of new data
    474         string Message = string("EVENT")+Name;
    475         if (write(m->Pipe[1], Message.data(), Message.size()) == -1) {
    476           m->Message(m->ERROR, "write() to Pipe[1] failed in class FADBoard (%s)", strerror(errno));
    477           m->ExitRequest = true;
    478         }
    479479
    480480        // Remove event data from internal buffer
  • fact/FADctrl/History.txt

    r10164 r10185  
    141414/2/2011       Moved initialisation commands to Evidence configuration file
    151518/2/2011   Added 'reconnect' command
     1628/2/2011       Removed 'static' keywords in FADBoard::ReadLoop()
Note: See TracChangeset for help on using the changeset viewer.