merge ocnflict for white background

This commit is contained in:
Dhanya Maliakal
2017-11-28 11:29:15 +01:00
17 changed files with 101 additions and 102 deletions

View File

@ -78,7 +78,7 @@ int BinaryFile::WriteToFile(char* buffer, int buffersize, uint64_t fnum, uint32_
numActualPacketsInFile += nump;
if (BinaryFileStatic::WriteDataFile(filefd, buffer, buffersize, fnum) == buffersize)
return OK;
bprintf(RED,"%d Error: Write to file failed for image number %lld\n", index, (long long int)fnum);
cprintf(RED,"%d Error: Write to file failed for image number %lld\n", index, (long long int)fnum);
return FAIL;
}

View File

@ -196,7 +196,7 @@ void DataProcessor::RecordFirstIndices(uint64_t fnum) {
}
#ifdef VERBOSE
bprintf(BLUE,"%d First Acquisition Index:%lld\tFirst Measurement Index:%lld\n",
cprintf(BLUE,"%d First Acquisition Index:%lld\tFirst Measurement Index:%lld\n",
index, (long long int)firstAcquisitionIndex, (long long int)firstMeasurementIndex);
#endif
}
@ -303,13 +303,13 @@ void DataProcessor::ThreadExecution() {
char* buffer=0;
fifo->PopAddress(buffer);
#ifdef FIFODEBUG
if (!index) bprintf(BLUE,"DataProcessor %d, pop 0x%p buffer:%s\n", index,(void*)(buffer),buffer);
if (!index) cprintf(BLUE,"DataProcessor %d, pop 0x%p buffer:%s\n", index,(void*)(buffer),buffer);
#endif
//check dummy
uint32_t numBytes = (uint32_t)(*((uint32_t*)buffer));
#ifdef VERBOSE
if (!index) bprintf(BLUE,"DataProcessor %d, Numbytes:%u\n", index,numBytes);
if (!index) cprintf(BLUE,"DataProcessor %d, Numbytes:%u\n", index,numBytes);
#endif
if (numBytes == DUMMY_PACKET_VALUE) {
StopProcessing(buffer);
@ -329,7 +329,7 @@ void DataProcessor::ThreadExecution() {
void DataProcessor::StopProcessing(char* buf) {
#ifdef VERBOSE
if (!index)
bprintf(RED,"DataProcessing %d: Dummy\n", index);
cprintf(RED,"DataProcessing %d: Dummy\n", index);
#endif
//stream or free
if (*dataStreamEnable)
@ -360,12 +360,12 @@ void DataProcessor::ProcessAnImage(char* buf) {
#ifdef VERBOSE
if (!index)
bprintf(BLUE,"DataProcessing %d: fnum:%lu\n", index, fnum);
cprintf(BLUE,"DataProcessing %d: fnum:%lu\n", index, fnum);
#endif
if (!measurementStartedFlag) {
#ifdef VERBOSE
if (!index) bprintf(BLUE,"DataProcessing %d: fnum:%lu\n", index, fnum);
if (!index) cprintf(BLUE,"DataProcessing %d: fnum:%lu\n", index, fnum);
#endif
RecordFirstIndices(fnum);
@ -441,7 +441,7 @@ bool DataProcessor::CheckTimer() {
struct timespec end;
clock_gettime(CLOCK_REALTIME, &end);
#ifdef VERBOSE
bprintf(BLUE,"%d Timer elapsed time:%f seconds\n", index, ( end.tv_sec - timerBegin.tv_sec ) + ( end.tv_nsec - timerBegin.tv_nsec ) / 1000000000.0);
cprintf(BLUE,"%d Timer elapsed time:%f seconds\n", index, ( end.tv_sec - timerBegin.tv_sec ) + ( end.tv_nsec - timerBegin.tv_nsec ) / 1000000000.0);
#endif
//still less than streaming timer, keep waiting
if((( end.tv_sec - timerBegin.tv_sec ) + ( end.tv_nsec - timerBegin.tv_nsec ) / 1000000000.0) < ((double)*streamingTimerInMs/1000.00))

View File

@ -139,7 +139,7 @@ void DataStreamer::RecordFirstIndices(uint64_t fnum) {
}
#ifdef VERBOSE
bprintf(BLUE,"%d First Acquisition Index:%lld\tFirst Measurement Index:%lld\n",
cprintf(BLUE,"%d First Acquisition Index:%lld\tFirst Measurement Index:%lld\n",
index, (long long int)firstAcquisitionIndex, (long long int)firstMeasurementIndex);
#endif
}
@ -167,7 +167,7 @@ int DataStreamer::CreateZmqSockets(int* nunits, uint32_t port, const char* srcip
zmqSocket = new ZmqSocket(portnum, (strlen(srcip)?srcip:NULL));
if (zmqSocket->IsError()) {
bprintf(RED, "Error: Could not create Zmq socket on port %d for Streamer %d\n", portnum, index);
cprintf(RED, "Error: Could not create Zmq socket on port %d for Streamer %d\n", portnum, index);
return FAIL;
}
FILE_LOG(logINFO) << index << " Streamer: Zmq Server started at " << zmqSocket->GetZmqServerAddress();
@ -187,13 +187,13 @@ void DataStreamer::ThreadExecution() {
char* buffer=0;
fifo->PopAddressToStream(buffer);
#ifdef FIFODEBUG
if (!index) bprintf(BLUE,"DataStreamer %d, pop 0x%p buffer:%s\n", index,(void*)(buffer),buffer);
if (!index) cprintf(BLUE,"DataStreamer %d, pop 0x%p buffer:%s\n", index,(void*)(buffer),buffer);
#endif
//check dummy
uint32_t numBytes = (uint32_t)(*((uint32_t*)buffer));
#ifdef VERBOSE
bprintf(GREEN,"DataStreamer %d, Numbytes:%u\n", index,numBytes);
cprintf(GREEN,"DataStreamer %d, Numbytes:%u\n", index,numBytes);
#endif
if (numBytes == DUMMY_PACKET_VALUE) {
StopProcessing(buffer);
@ -212,12 +212,12 @@ void DataStreamer::ThreadExecution() {
void DataStreamer::StopProcessing(char* buf) {
#ifdef VERBOSE
if (!index)
bprintf(RED,"DataStreamer %d: Dummy\n", index);
cprintf(RED,"DataStreamer %d: Dummy\n", index);
#endif
sls_detector_header* header = (sls_detector_header*) (buf);
//send dummy header and data
if (!SendHeader(header, 0, 0, true))
bprintf(RED,"Error: Could not send zmq dummy header for streamer %d\n", index);
cprintf(RED,"Error: Could not send zmq dummy header for streamer %d\n", index);
fifo->FreeAddress(buf);
StopRunning();
@ -232,12 +232,12 @@ void DataStreamer::ProcessAnImage(char* buf) {
sls_detector_header* header = (sls_detector_header*) (buf);
uint64_t fnum = header->frameNumber;
#ifdef VERBOSE
bprintf(MAGENTA,"DataStreamer %d: fnum:%lu\n", index,fnum);
cprintf(MAGENTA,"DataStreamer %d: fnum:%lu\n", index,fnum);
#endif
if (!measurementStartedFlag) {
#ifdef VERBOSE
if (!index) bprintf(MAGENTA,"DataStreamer %d: fnum:%lu\n", index, fnum);
if (!index) cprintf(MAGENTA,"DataStreamer %d: fnum:%lu\n", index, fnum);
#endif
RecordFirstIndices(fnum);
}
@ -246,12 +246,12 @@ void DataStreamer::ProcessAnImage(char* buf) {
if (completeBuffer) {
if (!SendHeader(header, generalData->nPixelsXComplete, generalData->nPixelsYComplete, false))
bprintf(RED,"Error: Could not send zmq header for fnum %lld and streamer %d\n",
cprintf(RED,"Error: Could not send zmq header for fnum %lld and streamer %d\n",
(long long int) fnum, index);
memcpy(completeBuffer + ((generalData->imageSize)**shortFrameEnable), buf + sizeof(sls_detector_header), generalData->imageSize);
if (!zmqSocket->SendData(completeBuffer, generalData->imageSizeComplete))
bprintf(RED,"Error: Could not send zmq data for fnum %lld and streamer %d\n",
cprintf(RED,"Error: Could not send zmq data for fnum %lld and streamer %d\n",
(long long int) fnum, index);
}
@ -260,11 +260,11 @@ void DataStreamer::ProcessAnImage(char* buf) {
else {
if (!SendHeader(header, generalData->nPixelsX, generalData->nPixelsY, false))
bprintf(RED,"Error: Could not send zmq header for fnum %lld and streamer %d\n",
cprintf(RED,"Error: Could not send zmq header for fnum %lld and streamer %d\n",
(long long int) fnum, index);
if (!zmqSocket->SendData(buf + sizeof(sls_detector_header), generalData->imageSize))
bprintf(RED,"Error: Could not send zmq data for fnum %lld and streamer %d\n",
cprintf(RED,"Error: Could not send zmq data for fnum %lld and streamer %d\n",
(long long int) fnum, index);
}
}

View File

@ -32,7 +32,7 @@ Fifo::Fifo(uint32_t fifoItemSize, uint32_t depth, bool &success):
Fifo::~Fifo() {
FILE_LOG (logDEBUG) << __AT__ << " called";
//bprintf(BLUE,"Fifo Object %d: Goodbye\n", index);
//cprintf(BLUE,"Fifo Object %d: Goodbye\n", index);
DestroyFifos();
NumberofFifoClassObjects--;
}
@ -64,7 +64,7 @@ int Fifo::CreateFifos(uint32_t fifoItemSize) {
while (buffer < (memory + fifoItemSize * (fifoDepth-1))) {
//sprintf(buffer,"memory");
#ifdef FIFODEBUG
bprintf(MAGENTA,"Fifofree %d: value:%d, pop 0x%p\n", index, fifoFree->getSemValue(), (void*)(buffer));
cprintf(MAGENTA,"Fifofree %d: value:%d, pop 0x%p\n", index, fifoFree->getSemValue(), (void*)(buffer));
#endif
FreeAddress(buffer);
buffer += fifoItemSize;

View File

@ -109,7 +109,7 @@ int HDF5File::CreateFile(uint64_t fnum) {
}
pthread_mutex_unlock(&Mutex);
if (dataspace == NULL)
bprintf(RED,"Got nothing!\n");
cprintf(RED,"Got nothing!\n");
if(!silentMode)
FILE_LOG(logINFO) << *udpPortNumber << ": HDF5 File created: " << currentFileName;
@ -158,7 +158,7 @@ int HDF5File::WriteToFile(char* buffer, int buffersize, uint64_t fnum, uint32_t
}
}
pthread_mutex_unlock(&Mutex);
bprintf(RED,"%d Error: Write to file failed\n", index);
cprintf(RED,"%d Error: Write to file failed\n", index);
return FAIL;
}

View File

@ -180,7 +180,7 @@ void Listener::RecordFirstIndices(uint64_t fnum) {
}
if(!SilentMode) {
if (!index) bprintf(BLUE,"%d First Acquisition Index:%lu\n"
if (!index) cprintf(BLUE,"%d First Acquisition Index:%lu\n"
"%d First Measurement Index:%lu\n",
index, firstAcquisitionIndex,
index, firstMeasurementIndex);
@ -252,7 +252,7 @@ void Listener::ThreadExecution() {
fifo->GetNewAddress(buffer);
#ifdef FIFODEBUG
bprintf(GREEN,"Listener %d, pop 0x%p buffer:%s\n", index,(void*)(buffer),buffer);
cprintf(GREEN,"Listener %d, pop 0x%p buffer:%s\n", index,(void*)(buffer),buffer);
#endif
//udpsocket doesnt exist
@ -315,8 +315,8 @@ void Listener::StopListening(char* buf) {
udpSocket = 0;
}
#ifdef VERBOSE
bprintf(GREEN,"%d: Listening Packets (%u) : %llu\n", index, *udpPortNumber, numPacketsCaught);
bprintf(GREEN,"%d: Listening Completed\n", index);
cprintf(GREEN,"%d: Listening Packets (%u) : %llu\n", index, *udpPortNumber, numPacketsCaught);
cprintf(GREEN,"%d: Listening Completed\n", index);
#endif
}
@ -347,7 +347,7 @@ uint32_t Listener::ListenToAnImage(char* buf) {
//look for carry over
if (carryOverFlag) {
//bprintf(RED,"%d carry flag\n",index);
//cprintf(RED,"%d carry flag\n",index);
//check if its the current image packet
// -------------------------- new header ----------------------------------------------------------------------
if (standardheader) {
@ -363,7 +363,7 @@ uint32_t Listener::ListenToAnImage(char* buf) {
//------------------------------------------------------------------------------------------------------------
if (fnum != currentFrameIndex) {
if (fnum < currentFrameIndex) {
bprintf(RED,"Error:(Weird), With carry flag: Frame number %lu less than current frame number %lu\n", fnum, currentFrameIndex);
cprintf(RED,"Error:(Weird), With carry flag: Frame number %lu less than current frame number %lu\n", fnum, currentFrameIndex);
return 0;
}
new_header->packetNumber = numpackets;
@ -460,7 +460,7 @@ uint32_t Listener::ListenToAnImage(char* buf) {
#ifdef VERBOSE
//if (!index)
bprintf(GREEN,"Listening %d: currentfindex:%lu, fnum:%lu, pnum:%u numpackets:%u\n",
cprintf(GREEN,"Listening %d: currentfindex:%lu, fnum:%lu, pnum:%u numpackets:%u\n",
index,currentFrameIndex, fnum, pnum, numpackets);
#endif
if (!measurementStartedFlag)
@ -468,7 +468,7 @@ uint32_t Listener::ListenToAnImage(char* buf) {
//future packet by looking at image number (all other detectors)
if (fnum != currentFrameIndex) {
//bprintf(RED,"setting carry over flag to true num:%llu nump:%u\n",fnum, numpackets );
//cprintf(RED,"setting carry over flag to true num:%llu nump:%u\n",fnum, numpackets );
carryOverFlag = true;
memcpy(carryOverPacket,listeningPacket, generalData->packetSize);
@ -549,9 +549,9 @@ void Listener::PrintFifoStatistics() {
numFramesStatistic = 0;
if (loss)
bprintf(RED,"[%u]: Packet_Loss:%lu Used_Fifo_Max_Level:%d \tFree_Slots_Min_Level:%d \tCurrent_Frame#:%lu\n",
cprintf(RED,"[%u]: Packet_Loss:%lu Used_Fifo_Max_Level:%d \tFree_Slots_Min_Level:%d \tCurrent_Frame#:%lu\n",
*udpPortNumber,loss, fifo->GetMaxLevelForFifoBound() , fifo->GetMinLevelForFifoFree(), currentFrameIndex);
else
bprintf(GREEN,"[%u]: Packet_Loss:%lu Used_Fifo_Max_Level:%d \tFree_Slots_Min_Level:%d \tCurrent_Frame#:%lu\n",
cprintf(GREEN,"[%u]: Packet_Loss:%lu Used_Fifo_Max_Level:%d \tFree_Slots_Min_Level:%d \tCurrent_Frame#:%lu\n",
*udpPortNumber,loss, fifo->GetMaxLevelForFifoBound(), fifo->GetMinLevelForFifoFree(), currentFrameIndex);
}

View File

@ -75,7 +75,7 @@ void* ThreadObject::StartThread(void* thisPointer) {
void ThreadObject::RunningThread() {
bprintf(BLUE,"Created [ %s Thread %d, Tid: %ld ]\n", GetType().c_str(),index, (long)syscall(SYS_gettid));
cprintf(BLUE,"Created [ %s Thread %d, Tid: %ld ]\n", GetType().c_str(),index, (long)syscall(SYS_gettid));
while(true) {
while(IsRunning()) {
@ -89,7 +89,7 @@ void ThreadObject::RunningThread() {
sem_wait(&semaphore);
if(killThread) {
bprintf(BLUE,"Exiting [ %s Thread %d, Tid: %ld ]\n", GetType().c_str(),index, (long)syscall(SYS_gettid));
cprintf(BLUE,"Exiting [ %s Thread %d, Tid: %ld ]\n", GetType().c_str(),index, (long)syscall(SYS_gettid));
pthread_exit(NULL);
}

View File

@ -167,7 +167,7 @@ void UDPStandardImplementation::setFileWriteEnable(const bool b){
int UDPStandardImplementation::setShortFrameEnable(const int i) {
if (myDetectorType != GOTTHARD) {
bprintf(RED, "Error: Can not set short frame for this detector\n");
cprintf(RED, "Error: Can not set short frame for this detector\n");
return FAIL;
}
@ -227,9 +227,9 @@ int UDPStandardImplementation::setDataStreamEnable(const bool enable) {
}
if (DataStreamer::GetErrorMask() || error) {
if (DataStreamer::GetErrorMask())
bprintf(RED,"Error: Could not create data callback threads\n");
cprintf(RED,"Error: Could not create data callback threads\n");
else
bprintf(RED,"Error: Could not create zmq sockets\n");
cprintf(RED,"Error: Could not create zmq sockets\n");
for (vector<DataStreamer*>::const_iterator it = dataStreamer.begin(); it != dataStreamer.end(); ++it)
delete(*it);
dataStreamer.clear();
@ -422,7 +422,7 @@ void UDPStandardImplementation::resetAcquisitionCount() {
int UDPStandardImplementation::startReceiver(char *c) {
bprintf(GRAY,"\n");
cprintf(DARKGRAY,"\n");
FILE_LOG(logINFO) << "Starting Receiver";
ResetParametersforNewMeasurement();
@ -510,19 +510,19 @@ void UDPStandardImplementation::stopReceiver(){
uint64_t missingpackets = numberOfFrames*generalData->packetsPerFrame-listener[i]->GetPacketsCaught();
if (missingpackets) {
bprintf(RED, "\n[Port %d]\n",udpPortNum[i]);
bprintf(RED, "Missing Packets\t\t: %lld\n",(long long int)missingpackets);
bprintf(RED, "Complete Frames\t\t: %lld\n",(long long int)dataProcessor[i]->GetNumFramesCaught());
bprintf(RED, "Last Frame Caught\t: %lld\n",(long long int)listener[i]->GetLastFrameIndexCaught());
cprintf(RED, "\n[Port %d]\n",udpPortNum[i]);
cprintf(RED, "Missing Packets\t\t: %lld\n",(long long int)missingpackets);
cprintf(RED, "Complete Frames\t\t: %lld\n",(long long int)dataProcessor[i]->GetNumFramesCaught());
cprintf(RED, "Last Frame Caught\t: %lld\n",(long long int)listener[i]->GetLastFrameIndexCaught());
}else{
bprintf(GREEN, "\n[Port %d]\n",udpPortNum[i]);
bprintf(GREEN, "Missing Packets\t\t: %lld\n",(long long int)missingpackets);
bprintf(GREEN, "Complete Frames\t\t: %lld\n",(long long int)dataProcessor[i]->GetNumFramesCaught());
bprintf(GREEN, "Last Frame Caught\t: %lld\n",(long long int)listener[i]->GetLastFrameIndexCaught());
cprintf(GREEN, "\n[Port %d]\n",udpPortNum[i]);
cprintf(GREEN, "Missing Packets\t\t: %lld\n",(long long int)missingpackets);
cprintf(GREEN, "Complete Frames\t\t: %lld\n",(long long int)dataProcessor[i]->GetNumFramesCaught());
cprintf(GREEN, "Last Frame Caught\t: %lld\n",(long long int)listener[i]->GetLastFrameIndexCaught());
}
}
if(!activated)
bprintf(RED,"Note: Deactivated Receiver\n");
cprintf(RED,"Note: Deactivated Receiver\n");
//callback
if (acquisitionFinishedCallBack)
acquisitionFinishedCallBack((tot/numThreads), pAcquisitionFinished);
@ -554,7 +554,7 @@ void UDPStandardImplementation::startReadout(){
//wait as long as there is change from prev totalP,
while(prev != totalP){
#ifdef VERY_VERBOSE
bprintf(MAGENTA,"waiting for all packets prevP:%d totalP:%d\n",
cprintf(MAGENTA,"waiting for all packets prevP:%d totalP:%d\n",
prev,totalP);
#endif
@ -567,7 +567,7 @@ void UDPStandardImplementation::startReadout(){
for (vector<Listener*>::const_iterator it = listener.begin(); it != listener.end(); ++it)
totalP += (*it)->GetPacketsCaught();
#ifdef VERY_VERBOSE
bprintf(MAGENTA,"\tupdated: totalP:%d\n",totalP);
cprintf(MAGENTA,"\tupdated: totalP:%d\n",totalP);
#endif
}
}
@ -657,7 +657,7 @@ int UDPStandardImplementation::SetupFifoStructure() {
(generalData->imageSize) * numberofJobs + (generalData->fifoBufferHeaderSize),
fifoDepth, success));
if (!success) {
bprintf(RED,"Error: Could not allocate memory for fifo structure of index %d\n", i);
cprintf(RED,"Error: Could not allocate memory for fifo structure of index %d\n", i);
for (vector<Fifo*>::const_iterator it = fifo.begin(); it != fifo.end(); ++it)
delete(*it);
fifo.clear();

View File

@ -60,7 +60,7 @@ void GetData(uint64_t frameNumber, uint32_t expLength, uint32_t packetNumber, ui
int main(int argc, char *argv[]) {
keeprunning = true;
bprintf(BLUE,"Created [ Tid: %ld ]\n", (long)syscall(SYS_gettid));
cprintf(BLUE,"Created [ Tid: %ld ]\n", (long)syscall(SYS_gettid));
// Catch signal SIGINT to close files and call destructors properly
struct sigaction sa;
@ -68,7 +68,7 @@ int main(int argc, char *argv[]) {
sa.sa_handler=sigInterruptHandler; // handler function
sigemptyset(&sa.sa_mask); // dont block additional signals during invocation of handler
if (sigaction(SIGINT, &sa, NULL) == -1) {
bprintf(RED, "Could not set handler function for SIGINT\n");
cprintf(RED, "Could not set handler function for SIGINT\n");
}
@ -79,7 +79,7 @@ int main(int argc, char *argv[]) {
asa.sa_handler=SIG_IGN; // handler function
sigemptyset(&asa.sa_mask); // dont block additional signals during invocation of handler
if (sigaction(SIGPIPE, &asa, NULL) == -1) {
bprintf(RED, "Could not set handler function for SIGPIPE\n");
cprintf(RED, "Could not set handler function for SIGPIPE\n");
}
@ -87,7 +87,7 @@ int main(int argc, char *argv[]) {
slsReceiverUsers *receiver = new slsReceiverUsers(argc, argv, ret);
if(ret==slsReceiverDefs::FAIL){
delete receiver;
bprintf(BLUE,"Exiting [ Tid: %ld ]\n", (long)syscall(SYS_gettid));
cprintf(BLUE,"Exiting [ Tid: %ld ]\n", (long)syscall(SYS_gettid));
exit(EXIT_FAILURE);
}
@ -136,17 +136,17 @@ int main(int argc, char *argv[]) {
//start tcp server thread
if (receiver->start() == slsReceiverDefs::FAIL){
delete receiver;
bprintf(BLUE,"Exiting [ Tid: %ld ]\n", (long)syscall(SYS_gettid));
cprintf(BLUE,"Exiting [ Tid: %ld ]\n", (long)syscall(SYS_gettid));
exit(EXIT_FAILURE);
}
FILE_LOG(logINFO) << "Ready ... ";
bprintf(GRAY, "\n[ Press \'Ctrl+c\' to exit ]\n");
cprintf(DARKGRAY, "\n[ Press \'Ctrl+c\' to exit ]\n");
while(keeprunning)
pause();
delete receiver;
bprintf(BLUE,"Exiting [ Tid: %ld ]\n", (long)syscall(SYS_gettid));
cprintf(BLUE,"Exiting [ Tid: %ld ]\n", (long)syscall(SYS_gettid));
FILE_LOG(logINFO) << "Goodbye!";
return 0;
}

View File

@ -186,7 +186,7 @@ void* slsReceiverTCPIPInterface::startTCPServerThread(void *this_pointer){
void slsReceiverTCPIPInterface::startTCPServer(){
bprintf(BLUE,"Created [ TCP server Tid: %ld ]\n", (long)syscall(SYS_gettid));
cprintf(BLUE,"Created [ TCP server Tid: %ld ]\n", (long)syscall(SYS_gettid));
#ifdef VERYVERBOSE
FILE_LOG(logDEBUG5) << "Starting Receiver TCP Server";
@ -222,7 +222,7 @@ void slsReceiverTCPIPInterface::startTCPServer(){
}
mySock->exitServer();
bprintf(BLUE,"Exiting [ TCP server Tid: %ld ]\n", (long)syscall(SYS_gettid));
cprintf(BLUE,"Exiting [ TCP server Tid: %ld ]\n", (long)syscall(SYS_gettid));
pthread_exit(NULL);
}
@ -233,7 +233,7 @@ void slsReceiverTCPIPInterface::startTCPServer(){
receiverBase->shutDownUDPSockets();
}
}
bprintf(BLUE,"Exiting [ TCP server Tid: %ld ]\n", (long)syscall(SYS_gettid));
cprintf(BLUE,"Exiting [ TCP server Tid: %ld ]\n", (long)syscall(SYS_gettid));
pthread_exit(NULL);
}
@ -347,7 +347,7 @@ int slsReceiverTCPIPInterface::function_table(){
int slsReceiverTCPIPInterface::decode_function(){
ret = FAIL;
#ifdef VERYVERBOSE
bprintf(GRAY,"\n");
cprintf(DARKGRAY,"\n");
FILE_LOG(logDEBUG1) << "waiting to receive data";
#endif
int n = mySock->ReceiveDataOnly(&fnum,sizeof(fnum));
@ -477,7 +477,7 @@ int slsReceiverTCPIPInterface::exit_server() {
strcpy(mess,"closing server");
mySock->SendDataOnly(&ret,sizeof(ret));
mySock->SendDataOnly(mess,sizeof(mess));
bprintf(RED,"%s\n",mess);
cprintf(RED,"%s\n",mess);
return ret;
}

View File

@ -54,9 +54,9 @@ int read_config_file(string fname, int *tcpip_port_no, map<string, string> * con
if(sstr.good()) {
sstr >> sargname;
if(sscanf(sargname.c_str(),"%d",tcpip_port_no))
bprintf(GRAY, "dataport: %d\n" , *tcpip_port_no);
cprintf(DARKGRAY, "dataport: %d\n" , *tcpip_port_no);
else{
bprintf(RED, "could not decode port in config file. Exiting.\n");
cprintf(RED, "could not decode port in config file. Exiting.\n");
success = slsReceiverDefs::FAIL;
}
}