Closed GoogleCodeExporter closed 9 years ago
Update the code as shown under issue 36 and recompile. This problem will go
away!
Keith
Original comment by kridg...@harris.com
on 21 Jul 2011 at 7:07
Hi, I'm Jackie who joined a few days ago.
Once you see a source code, you can understand why it works just one time in
case of UDP testing.
Speaking of the code level, let's see the ipfer_run() in main.c.
After completion of 'iperf_run_server(test)' data struction of "test" is reset
by 'iperf_reset_test(test)'.
127 int
128 iperf_run(struct iperf_test * test)
129 {
130 switch (test->role) {
131 case 's':
132 for (;;) {
133 if (iperf_run_server(test) < 0) {
134 iperf_error("error");
135 printf("\n");
136 }
137 iperf_reset_test(test);
138 }
(snipped)
BTW, One of iperf_reset_test() routine is always set protocol to the "TCP".
Hence you can fix the code as follows,
1141 #if DEBUG /* busylee */
1142 printf("####[%s:%d]protocol:%s\n", __FUNCTION__, __LINE__,
test->protocol->name);
1143 #endif
1144 if (test->protocol->id == Ptcp) {
1145 set_protocol(test, Ptcp);
1146 } else if (test->protocol->id == Pudp) {
1147 set_protocol(test, Pudp);
1148 }
Take care...
Original comment by busy...@gmail.com
on 22 Jul 2011 at 9:40
I can confirm that the fix referenced in issue 36 comment 3 resolve this
problem for me beta 4.
Original comment by mil...@gmail.com
on 9 Feb 2012 at 12:36
fixed
Original comment by bltier...@gmail.com
on 7 Sep 2012 at 3:58
Original issue reported on code.google.com by
eduade.2...@gmail.com
on 23 May 2011 at 5:43Attachments: