Author: jelmer
Date: 2008-01-03 17:21:50 +0000 (Thu, 03 Jan 2008)
New Revision: 26650

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26650

Log:
torture/raw: Fix warnings in lockbench/openbench. 

I'm surprised this didn't cause any breakages. We should probably run (a subset 
of) RAW-LOCKBENCH + RAW-OPENBENCH in make test to make sure they don't regress.

Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/torture/raw/lockbench.c
   branches/SAMBA_4_0/source/torture/raw/openbench.c


Changeset:

Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/torture/raw/lockbench.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/lockbench.c   2008-01-03 06:00:38 UTC 
(rev 26649)
+++ branches/SAMBA_4_0/source/torture/raw/lockbench.c   2008-01-03 17:21:50 UTC 
(rev 26650)
@@ -59,7 +59,7 @@
        struct timed_event *te;
 
        /* these are used for reconnections */
-       int dest_port;
+       const char **dest_ports;
        const char *dest_host;
        const char *called_name;
        const char *service_type;
@@ -186,7 +186,7 @@
        }
 
        io->in.dest_host    = state->dest_host;
-       io->in.dest_ports   = state->dest_port;
+       io->in.dest_ports   = state->dest_ports;
        io->in.called_name  = state->called_name;
        io->in.service      = share;
        io->in.service_type = state->service_type;
@@ -345,7 +345,12 @@
                state[i].tree = cli->tree;
                state[i].dest_host = talloc_strdup(state[i].mem_ctx, 
                                                   
cli->tree->session->transport->socket->hostname);
-               state[i].dest_port = 
cli->tree->session->transport->socket->port;
+               state[i].dest_ports = talloc_array(state[i].mem_ctx, 
+                                                  const char *, 2);
+               state[i].dest_ports[0] = talloc_asprintf(state[i].dest_ports, 
+                                                        "%u", 
+                                                        
cli->tree->session->transport->socket->port);
+               state[i].dest_ports[1] = NULL;
                state[i].called_name  = talloc_strdup(state[i].mem_ctx,
                                                      
cli->tree->session->transport->called.name);
                state[i].service_type = talloc_strdup(state[i].mem_ctx,

Modified: branches/SAMBA_4_0/source/torture/raw/openbench.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/openbench.c   2008-01-03 06:00:38 UTC 
(rev 26649)
+++ branches/SAMBA_4_0/source/torture/raw/openbench.c   2008-01-03 17:21:50 UTC 
(rev 26650)
@@ -62,7 +62,7 @@
        struct timed_event *te;
 
        /* these are used for reconnections */
-       int dest_port;
+       const char **dest_ports;
        const char *dest_host;
        const char *called_name;
        const char *service_type;
@@ -124,7 +124,7 @@
        }
 
        io->in.dest_host    = state->dest_host;
-       io->in.dest_ports   = state->dest_port;
+       io->in.dest_ports   = state->dest_ports;
        io->in.called_name  = state->called_name;
        io->in.service      = share;
        io->in.service_type = state->service_type;
@@ -379,7 +379,11 @@
                state[i].tree = state[i].cli->tree;
                state[i].dest_host = talloc_strdup(state[i].mem_ctx, 
                                                   
state[i].cli->tree->session->transport->socket->hostname);
-               state[i].dest_port = 
state[i].cli->tree->session->transport->socket->port;
+               state[i].dest_ports = talloc_array(state[i].mem_ctx, 
+                                                  const char *, 2);
+               state[i].dest_ports[0] = talloc_asprintf(state[i].dest_ports, 
+                                                        "%u", 
state[i].cli->tree->session->transport->socket->port);
+               state[i].dest_ports[1] = NULL;
                state[i].called_name  = talloc_strdup(state[i].mem_ctx,
                                                      
state[i].cli->tree->session->transport->called.name);
                state[i].service_type = talloc_strdup(state[i].mem_ctx,

Reply via email to