solved many bugs, but cannot get data in eiger

This commit is contained in:
Dhanya Maliakal
2017-06-09 16:02:58 +02:00
parent c755a8974c
commit 132a9bbfe9
15 changed files with 545 additions and 351 deletions

View File

@ -328,16 +328,15 @@ int receiveData(int file_des, void* buf,int length, intType itype){
int nreceiving;
int nreceived;
if (file_des<0) return -1;
//#ifdef VERY_VERBOSE
#ifdef VERY_VERBOSE
printf("want to receive %d Bytes\n", length);
//#endif
#endif
while(length > 0) {
nreceiving = (length>send_rec_max_size) ? send_rec_max_size:length;
nreceived = read(file_des,(char*)buf+total_received,nreceiving);
if(!nreceived){
if(!total_received) {
cprintf(BG_RED, "Error reading from socket. Possible socket crash\n");
return -1; //to handle it
}
break;

View File

@ -111,6 +111,7 @@ enum detFuncs{
F_POWER_CHIP, /**< power chip */
F_ACTIVATE, /** < activate */
F_PREPARE_ACQUISITION, /** < prepare acquisition */
F_CLEANUP_ACQUISITION, /** < clean up after acquisition */
/* Always append functions hereafter!!! */
/* Always append functions before!!! */