If server is running continuously the port number increments
from base without reseting between tests. This will
eventually cause collisions in port space.

Signed-off-by: Arlin Davis <[email protected]>
---
 test/dapltest/test/dapl_server.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/test/dapltest/test/dapl_server.c b/test/dapltest/test/dapl_server.c
index 4d386fe..fc6c8af 100644
--- a/test/dapltest/test/dapl_server.c
+++ b/test/dapltest/test/dapl_server.c
@@ -465,6 +465,9 @@ DT_cs_Server (Params_t * params_ptr)
        DT_Tdep_PT_Debug (1,(phead,"%s: Send Server_Info\n", module));
        pt_ptr->Server_Info.dapltest_version = DAPLTEST_VERSION;
        pt_ptr->Server_Info.is_little_endian = DT_local_is_little_endian;
+       /* reset port, don't eat up port space on long runs */
+       if (ps_ptr->NextPortNumber >= SERVER_PORT_NUMBER + 1000)
+               ps_ptr->NextPortNumber = SERVER_PORT_NUMBER + 1;
        pt_ptr->Server_Info.first_port_number = ps_ptr->NextPortNumber;
        ps_ptr->NextPortNumber += pt_ptr->Client_Info.total_threads;
 
-- 
1.5.2.5

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to