untangled moench from jungfrau, quite a few changes

This commit is contained in:
Dhanya Maliakal
2016-10-27 07:26:47 +02:00
parent 7eda5f9de5
commit 3c646c3545
16 changed files with 3222 additions and 5319 deletions

View File

@ -27,7 +27,6 @@ int main(int argc, char *argv[])
int retval=OK;
int sd, fd;
int iarg;
int checkType = 1;
for(iarg=1; iarg<argc; iarg++){
@ -48,13 +47,6 @@ int main(int argc, char *argv[])
printf("No test condition given. Exiting.\n");
return 1;
}
if(!strcasecmp(argv[iarg+1],"with_gotthard")){
checkType = 0;
}else{
printf("could not decode test condition. Possible arguments: with_gotthard. Exiting\n");
return 1;
}
}
}
@ -68,31 +60,21 @@ int main(int argc, char *argv[])
}
b=0;
printf("\n\nStop Server\nOpening stop server on port %d\n",portno);
checkType=0;
}
//control server
else {
portno = DEFAULT_PORTNO;
if(checkType)
sprintf(cmd,"%s %d stopserver &",argv[0],DEFAULT_PORTNO+1);
else
sprintf(cmd,"%s %d stopserver -test with_gotthard &",argv[0],DEFAULT_PORTNO+1);
sprintf(cmd,"%s %d stopserver &",argv[0],DEFAULT_PORTNO+1);
printf("\n\nControl Server\nOpening control server on port %d\n",portno );
//printf("\n\ncmd:%s\n",cmd);
system(cmd);
b=1;
checkType=1;
}
init_detector(b, checkType);
init_detector(b);
sd=bindSocket(portno);