]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
dapltest: the quit command is missing changes for -n option.
authorArlin Davis <arlin.r.davis@intel.com>
Tue, 11 Feb 2014 18:19:05 +0000 (10:19 -0800)
committerArlin Davis <arlin.r.davis@intel.com>
Tue, 11 Feb 2014 18:19:05 +0000 (10:19 -0800)
Server-port was not being set properly during param init phase on the client side.

Signed-off-by: Arlin Davis <arlin.r.davis@intel.com>
test/dapltest/cmd/dapl_params.c
test/dapltest/cmd/dapl_quit_cmd.c
test/dapltest/include/dapl_quit_cmd.h

index e7a2006a912187ba40837da0e719e897a30cca77..f038324be7fb339547b48963ea393d2b8d0aa99d 100644 (file)
@@ -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(&params_ptr->server_netaddr,
                                                    Quit_Cmd->server_name);
                        break;
index d8536a7f2aafcd70ef6ad62ed8fc166783b84338..d8930e4e1b3aadce2b3a4fa7a674ec9a64283d23 100644 (file)
@@ -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 <server Name>\n");
+       DT_Mdep_printf("USAGE:              -n <server port number>\n");
        DT_Mdep_printf("USAGE:              [-D <device Name>]\n");
        DT_Mdep_printf("USAGE:              [-d] : debug (zero)\n");
        DT_Mdep_printf("USAGE:              [-R <service reliability>]\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);
 }
index 8aba24e14d7ca09b9c08dd86dba501b5432db0e1..86405412f6deb9438143972ec7e7fe991127ab8c 100644 (file)
@@ -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 ()