clearer udp destination entry error

This commit is contained in:
maliakal_d 2021-08-20 15:57:51 +02:00
parent fc35b2b0de
commit 493b58b754
4 changed files with 9 additions and 9 deletions

View File

@ -4927,44 +4927,44 @@ int check_detector_idle(const char *s) {
int is_udp_configured() { int is_udp_configured() {
for (int i = 0; i != numUdpDestinations; ++i) { for (int i = 0; i != numUdpDestinations; ++i) {
if (udpDetails[i].dstip == 0) { if (udpDetails[i].dstip == 0) {
strcpy(configureMessage, "udp destination ip not configured\n"); sprintf(configureMessage, "udp destination ip not configured [entry:%d]\n", i);
LOG(logWARNING, ("%s", configureMessage)); LOG(logWARNING, ("%s", configureMessage));
return FAIL; return FAIL;
} }
if (udpDetails[i].srcip == 0) { if (udpDetails[i].srcip == 0) {
strcpy(configureMessage, "udp source ip not configured\n"); sprintf(configureMessage, "udp source ip not configured [entry:%d]\n", i);
LOG(logWARNING, ("%s", configureMessage)); LOG(logWARNING, ("%s", configureMessage));
return FAIL; return FAIL;
} }
if (udpDetails[i].srcmac == 0) { if (udpDetails[i].srcmac == 0) {
strcpy(configureMessage, "udp source mac not configured\n"); sprintf(configureMessage, "udp source mac not configured [entry:%d]\n", i);
LOG(logWARNING, ("%s", configureMessage)); LOG(logWARNING, ("%s", configureMessage));
return FAIL; return FAIL;
} }
if (udpDetails[i].dstmac == 0) { if (udpDetails[i].dstmac == 0) {
strcpy(configureMessage, "udp destination mac not configured\n"); sprintf(configureMessage, "udp destination mac not configured [entry:%d]\n", i);
LOG(logWARNING, ("%s", configureMessage)); LOG(logWARNING, ("%s", configureMessage));
return FAIL; return FAIL;
} }
#if defined(JUNGFRAUD) || defined(GOTTHARD2D) #if defined(JUNGFRAUD) || defined(GOTTHARD2D)
if (getNumberofUDPInterfaces() == 2) { if (getNumberofUDPInterfaces() == 2) {
if (udpDetails[i].srcip2 == 0) { if (udpDetails[i].srcip2 == 0) {
strcpy(configureMessage, "udp source ip2 not configured\n"); sprintf(configureMessage, "udp source ip2 not configured [entry:%d]\n", i);
LOG(logWARNING, ("%s", configureMessage)); LOG(logWARNING, ("%s", configureMessage));
return FAIL; return FAIL;
} }
if (udpDetails[i].dstip2 == 0) { if (udpDetails[i].dstip2 == 0) {
strcpy(configureMessage, "udp destination ip2 not configured\n"); sprintf(configureMessage, "udp destination ip2 not configured [entry:%d]\n", i);
LOG(logWARNING, ("%s", configureMessage)); LOG(logWARNING, ("%s", configureMessage));
return FAIL; return FAIL;
} }
if (udpDetails[i].srcmac2 == 0) { if (udpDetails[i].srcmac2 == 0) {
strcpy(configureMessage, "udp source mac2 not configured\n"); sprintf(configureMessage, "udp source mac2 not configured [entry:%d]\n", i);
LOG(logWARNING, ("%s", configureMessage)); LOG(logWARNING, ("%s", configureMessage));
return FAIL; return FAIL;
} }
if (udpDetails[i].dstmac2 == 0) { if (udpDetails[i].dstmac2 == 0) {
strcpy(configureMessage, "udp destination mac2 not configured\n"); sprintf(configureMessage, "udp destination mac2 not configured [entry:%d]\n", i);
LOG(logWARNING, ("%s", configureMessage)); LOG(logWARNING, ("%s", configureMessage));
return FAIL; return FAIL;
} }

View File

@ -7,7 +7,7 @@
#define APIGOTTHARD 0x210820 #define APIGOTTHARD 0x210820
#define APIGOTTHARD2 0x210820 #define APIGOTTHARD2 0x210820
#define APIMYTHEN3 0x210820 #define APIMYTHEN3 0x210820
#define APIEIGER 0x210820
#define APICTB 0x210820 #define APICTB 0x210820
#define APIMOENCH 0x210820 #define APIMOENCH 0x210820
#define APIJUNGFRAU 0x210820 #define APIJUNGFRAU 0x210820
#define APIEIGER 0x210820