rx: fifodepth error will set fifodepth to 0

This commit is contained in:
2020-04-02 18:24:18 +02:00
parent 679db120b0
commit a1d91e590e
2 changed files with 3 additions and 2 deletions

View File

@ -828,6 +828,7 @@ int UDPStandardImplementation::SetupFifoStructure() {
for (std::vector<Fifo*>::const_iterator it = fifo.begin(); it != fifo.end(); ++it) for (std::vector<Fifo*>::const_iterator it = fifo.begin(); it != fifo.end(); ++it)
delete(*it); delete(*it);
fifo.clear(); fifo.clear();
fifoDepth = 0;
return FAIL; return FAIL;
} }
//set the listener & dataprocessor threads to point to the right fifo //set the listener & dataprocessor threads to point to the right fifo

View File

@ -1906,14 +1906,14 @@ int slsReceiverTCPIPInterface::set_fifo_depth() {
else { else {
ret = receiverBase->setFifoDepth(value); ret = receiverBase->setFifoDepth(value);
if (ret == FAIL) { if (ret == FAIL) {
strcpy(mess,"Could not set fifo depth"); strcpy(mess,"Could not set fifo depth\n");
FILE_LOG(logERROR) << mess; FILE_LOG(logERROR) << mess;
} }
} }
} }
//get //get
retval = receiverBase->getFifoDepth(); retval = receiverBase->getFifoDepth();
if(value >= 0 && retval != value) { if(ret == OK && value >= 0 && retval != value) {
ret = FAIL; ret = FAIL;
strcpy(mess, "Could not set fifo depth\n"); strcpy(mess, "Could not set fifo depth\n");
FILE_LOG(logERROR) << mess; FILE_LOG(logERROR) << mess;