diff --git a/slsDetectorSoftware/MySocketTCP/genericSocket.h b/slsDetectorSoftware/MySocketTCP/genericSocket.h index 8390c6322..d1c79630b 100644 --- a/slsDetectorSoftware/MySocketTCP/genericSocket.h +++ b/slsDetectorSoftware/MySocketTCP/genericSocket.h @@ -515,8 +515,10 @@ protocol(p), is_a_server(0), socketDescriptor(-1),file_des(-1), packet_size(DEFA break; case UDP: if (socketDescriptor<0) return -1; - while(length>0){ - nsending = (length>packet_size) ? packet_size:length; + // while(length>0){ + for(int i=0;i<2;i++){ + nsending=packet_size; + //nsending = (length>packet_size) ? packet_size:length; nsent = recvfrom(socketDescriptor,(char*)buf+total_sent,nsending, 0, (struct sockaddr *) &clientAddress, &clientAddress_length); if(!nsent) break; length-=nsent; diff --git a/slsDetectorSoftware/slsReceiver/slsReceiver.cpp b/slsDetectorSoftware/slsReceiver/slsReceiver.cpp index c353a7d3d..7e6997f87 100644 --- a/slsDetectorSoftware/slsReceiver/slsReceiver.cpp +++ b/slsDetectorSoftware/slsReceiver/slsReceiver.cpp @@ -37,6 +37,7 @@ int main(int argc, char *argv[]) if(ret==slsDetectorDefs::FAIL) return -1; + #ifdef VERBOSE cout << "Function table assigned." << endl; #endif diff --git a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp index 5ce9ad6b5..9712b2ca8 100644 --- a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp +++ b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp @@ -111,7 +111,7 @@ void slsReceiverFunctionList::closeFile(int p){ cout << "Closing file and Exiting." << endl; fclose(sfilefd); } - exit(0); + //exit(0); } diff --git a/slsDetectorSoftware/slsReceiver/slsReceiver_funcs.cpp b/slsDetectorSoftware/slsReceiver/slsReceiver_funcs.cpp index fb372ee9c..330cef4ca 100644 --- a/slsDetectorSoftware/slsReceiver/slsReceiver_funcs.cpp +++ b/slsDetectorSoftware/slsReceiver/slsReceiver_funcs.cpp @@ -6,7 +6,7 @@ #include "slsReceiver_funcs.h" #include "slsReceiverFunctionList.h" -#include // SIGINT +//#include //SIGINT #include #include @@ -15,6 +15,9 @@ using namespace std; + + + slsReceiverFuncs::slsReceiverFuncs(MySocketTCP *&mySocket,string const fname,int &success, bool shortfname): socket(mySocket), ret(OK), @@ -197,10 +200,7 @@ int slsReceiverFuncs::M_nofunc(){ /* void slsReceiverFuncs::closeFile(int p){ //if(socket) - slsReceiverFunctionList::closeFile(0); - socket->Disconnect();//non static - delete socket; - exit(0); + slsReceiverFunctionList::closeFile(); } */