From 88b6fabb0d017fb6b6e22a3c30fb330f6e0a80a8 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 28 Jul 2017 11:54:22 +0200 Subject: [PATCH] bug did not give error when switching to hdf5 --- slsReceiverSoftware/src/UDPBaseImplementation.cpp | 5 +++-- slsReceiverSoftware/src/UDPStandardImplementation.cpp | 5 +++-- slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/slsReceiverSoftware/src/UDPBaseImplementation.cpp b/slsReceiverSoftware/src/UDPBaseImplementation.cpp index c0165911a..0e2c3812c 100644 --- a/slsReceiverSoftware/src/UDPBaseImplementation.cpp +++ b/slsReceiverSoftware/src/UDPBaseImplementation.cpp @@ -250,10 +250,11 @@ void UDPBaseImplementation::setFileFormat(const fileFormat f){ switch(f){ #ifdef HDF5C case HDF5: - fileFormatType = f; + fileFormatType = HDF5; + break; #endif default: - fileFormatType = f; + fileFormatType = BINARY; break; } diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index d403fa1c0..a04e5131e 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -114,10 +114,11 @@ void UDPStandardImplementation::setFileFormat(const fileFormat f){ switch(f){ #ifdef HDF5C case HDF5: - fileFormatType = f; + fileFormatType = HDF5; + break; #endif default: - fileFormatType = f; + fileFormatType = BINARY; break; } //destroy file writer, set file format and create file writer diff --git a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp index a70e49114..1de7eb074 100644 --- a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp +++ b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp @@ -2179,7 +2179,7 @@ int slsReceiverTCPIPInterface::set_file_format() { retval = receiverBase->getFileFormat(); if(f >= 0 && retval != f){ ret = FAIL; - sprintf(mess,"Could not set file format to %d, returned %d\n",f,retval); + sprintf(mess,"Could not set file format to %s, returned %s\n",getFileFormatType(f).c_str(),getFileFormatType(retval).c_str()); FILE_LOG(logERROR) << "Warning: " << mess; } }