From: Arlin Davis Date: Tue, 11 Feb 2014 18:19:05 +0000 (-0800) Subject: dapltest: the quit command is missing changes for -n option. X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=85c34be6be16984fb1f478b54f7fd889ad716498;p=~ardavis%2Fdapl.git dapltest: the quit command is missing changes for -n option. Server-port was not being set properly during param init phase on the client side. Signed-off-by: Arlin Davis --- diff --git a/test/dapltest/cmd/dapl_params.c b/test/dapltest/cmd/dapl_params.c index e7a2006..f038324 100644 --- a/test/dapltest/cmd/dapl_params.c +++ b/test/dapltest/cmd/dapl_params.c @@ -199,6 +199,7 @@ bool DT_Params_Parse(int argc, char *argv[], Params_t * params_ptr) params_ptr->ReliabilityLevel = Quit_Cmd->ReliabilityLevel; params_ptr->debug = Quit_Cmd->debug; + params_ptr->server_port = Quit_Cmd->port; DT_NetAddrLookupHostAddress(¶ms_ptr->server_netaddr, Quit_Cmd->server_name); break; diff --git a/test/dapltest/cmd/dapl_quit_cmd.c b/test/dapltest/cmd/dapl_quit_cmd.c index d8536a7..d8930e4 100644 --- a/test/dapltest/cmd/dapl_quit_cmd.c +++ b/test/dapltest/cmd/dapl_quit_cmd.c @@ -35,6 +35,7 @@ void DT_Quit_Cmd_Init(Quit_Cmd_t * cmd) { memset((void *)cmd, 0, sizeof(Quit_Cmd_t)); cmd->ReliabilityLevel = DAT_QOS_BEST_EFFORT; + cmd->port = SERVER_PORT_NUMBER; } /*--------------------------------------------------------- */ @@ -45,7 +46,7 @@ DT_Quit_Cmd_Parse(Quit_Cmd_t * cmd, int c; for (;;) { - c = DT_mygetopt_r(my_argc, my_argv, "ds:D:R:", opts); + c = DT_mygetopt_r(my_argc, my_argv, "ds:D:R:n", opts); if (c == EOF) { break; } @@ -72,6 +73,11 @@ DT_Quit_Cmd_Parse(Quit_Cmd_t * cmd, DT_ParseQoS(opts->optarg); break; } + case 'n': + { + cmd->port = atoi(opts->optarg); + break; + } case '?': default: { @@ -113,6 +119,7 @@ void DT_Quit_Cmd_Usage(void) DT_Mdep_printf("USAGE: ---- QUIT TEST ----\n"); DT_Mdep_printf("USAGE: dapltest -T Q\n"); DT_Mdep_printf("USAGE: -s \n"); + DT_Mdep_printf("USAGE: -n \n"); DT_Mdep_printf("USAGE: [-D ]\n"); DT_Mdep_printf("USAGE: [-d] : debug (zero)\n"); DT_Mdep_printf("USAGE: [-R ]\n"); @@ -129,4 +136,5 @@ void DT_Quit_Cmd_Print(Quit_Cmd_t * cmd) { DT_Mdep_printf("Quit_Cmd.server_name: %s\n", cmd->server_name); DT_Mdep_printf("Quit_Cmd.device_name: %s\n", cmd->device_name); + DT_Mdep_printf("Quit_Cmd.port: %s\n", cmd->port); } diff --git a/test/dapltest/include/dapl_quit_cmd.h b/test/dapltest/include/dapl_quit_cmd.h index 8aba24e..8640541 100644 --- a/test/dapltest/include/dapl_quit_cmd.h +++ b/test/dapltest/include/dapl_quit_cmd.h @@ -38,6 +38,7 @@ typedef struct char device_name[256]; /* -D */ DAT_UINT32 debug; /* -d */ DAT_QOS ReliabilityLevel; /* -R */ + DAT_CONN_QUAL port; /* -n */ } Quit_Cmd_t; #pragma pack ()