eiger server bug fix: in 10giga mode always used the 1g ip (dhcp ip) if detectorip is before tengiga in config file

This commit is contained in:
2018-03-20 16:36:45 +01:00
parent afac5be3c3
commit 59ad15b54e
5 changed files with 36 additions and 23 deletions

View File

@@ -1,9 +1,9 @@
Path: slsDetectorsPackage/slsDetectorSoftware/eigerDetectorServer
URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
Repsitory UUID: 8b02aa9e91bbee0470492dcf1ff67415851e14fa
Revision: 315
Branch: 3.1.0-rc
Last Changed Author: Erik_Frojdh
Last Changed Rev: 3455
Last Changed Date: 2018-03-08 16:44:32.000000002 +0100 ./FebRegisterDefs.h
Repsitory UUID: afac5be3c3674fe87044d3b7a54471291698d4ba
Revision: 316
Branch: 3.1.1-rc
Last Changed Author: Dhanya_Thattil
Last Changed Rev: 3467
Last Changed Date: 2018-03-19 17:26:38.000000002 +0100 ./FebRegisterDefs.h

View File

@@ -1,6 +1,6 @@
#define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git"
#define GITREPUUID "8b02aa9e91bbee0470492dcf1ff67415851e14fa"
#define GITAUTH "Erik_Frojdh"
#define GITREV 0x3455
#define GITDATE 0x20180308
#define GITBRANCH "3.1.0-rc"
#define GITREPUUID "afac5be3c3674fe87044d3b7a54471291698d4ba"
#define GITAUTH "Dhanya_Thattil"
#define GITREV 0x3467
#define GITDATE 0x20180319
#define GITBRANCH "3.1.1-rc"

View File

@@ -39,6 +39,9 @@ char mess[MAX_STR_LENGTH];
int dataBytes = 10;
int isControlServer = 0;
int debugflag = 0;
#ifdef EIGERD
uint32_t dhcpipad = 0;
#endif
/* initialization functions */
@@ -64,6 +67,9 @@ void init_detector(int controlserver) {
if (controlserver) {
isControlServer = 1;
initControlServer();
#ifdef EIGERD
dhcpipad = getDetectorIP();
#endif
}
else initStopServer();
#endif
@@ -3488,16 +3494,19 @@ int configure_mac(int file_des) {
printf("WARNING: Matched detectormac to the hardware mac now\n");
printf("*************************************************\n");
}
// always remember the ip sent from the client (could be for 10g(if not dhcp))
if (detipad != getDetectorIP())
dhcpipad = detipad;
//only for 1Gbe
if(!enableTenGigabitEthernet(-1)){
if (detipad != getDetectorIP()){
printf("*************************************************\n");
printf("WARNING: actual detector ip address %x does not match the one from client %x\n",getDetectorIP(),detipad);
detipad = getDetectorIP();
printf("WARNING: Matched detector ip to the hardware ip now\n");
printf("*************************************************\n");
}
}
printf("*************************************************\n");
printf("WARNING: Using DHCP IP for Configuring MAC\n");
printf("*************************************************\n");
detipad = getDetectorIP();
} else
detipad = dhcpipad;
#endif
retval=configureMAC(ipad,imacadd,idetectormacadd,detipad,udpport,udpport2,0); //digitalTestBit);
if(retval==-1) {