Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r1158 committed - removed unnecessary code fragment

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r1158 committed - removed unnecessary code fragment


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r1158 committed - removed unnecessary code fragment
  • Date: Wed, 12 Nov 2014 14:46:58 +0000

Revision: 1158
Author:

Date: Wed Nov 12 14:46:40 2014 UTC
Log: removed unnecessary code fragment
https://code.google.com/p/ndt/source/detail?r=1158

Modified:
/branches/MultiplePorts/src/test_c2s_srv.c

=======================================
--- /branches/MultiplePorts/src/test_c2s_srv.c Wed Nov 12 14:27:44 2014 UTC
+++ /branches/MultiplePorts/src/test_c2s_srv.c Wed Nov 12 14:46:40 2014 UTC
@@ -143,7 +143,7 @@

port = strtol(testOptions->multiple ? mrange_next(listenc2sport, sizeof(listenc2sport)) : listenc2sport, NULL, 0);

- for (i = 0; i < options->uthreadsnum; ++i) {
+ for (i = 0; i < threadsNum; ++i) {
snprintf(listenc2sport, sizeof(listenc2sport), "%ld", port + i);

// attempt to bind to a new port and obtain address structure with details
@@ -158,31 +158,17 @@
break;
}
}
- }
-
-#ifdef EXTTESTS_ENABLED
- if (testOptions->exttestsopt) {
- threadsNum = options->uthreadsnum;
- testDuration = options->uduration / 1000.0;
- }
-#endif
-
- port = strtol(testOptions->multiple ? mrange_next(listenc2sport, sizeof(listenc2sport)) : listenc2sport, NULL, 0);
-
- for (i = 0; i < options->uthreadsnum; ++i) {
- snprintf(listenc2sport, sizeof(listenc2sport), "%ld", port + i);
-
- // attempt to bind to a new port and obtain address structure with details
- // of listening port
- while (c2ssrv_addr[i] == NULL) {
- c2ssrv_addr[i] = CreateListenSocket(NULL, listenc2sport, conn_options, 0);
- if (strcmp(listenc2sport, "0") == 0) {
- log_println(0, "WARNING: ephemeral port number was bound");
- break;
- }
- if (testOptions->multiple == 0) {
- break;
- }
+ if (c2ssrv_addr[i] == NULL) {
+ log_println(
+ 0,
+ "Server (C2S throughput test): CreateListenSocket failed: %s",
+ strerror(errno));
+ snprintf(buff,
+ sizeof(buff),
+ "Server (C2S throughput test): CreateListenSocket failed: %s",
+ strerror(errno));
+ send_json_message(ctlsockfd, MSG_ERROR, buff, strlen(buff), testOptions->json_support, JSON_SINGLE_VALUE);
+ return -1;
}

c2ssockfd[i] = I2AddrFD(c2ssrv_addr[i]);


  • [ndt-dev] [ndt] r1158 committed - removed unnecessary code fragment, ndt, 11/12/2014

Archive powered by MHonArc 2.6.16.

Top of Page