summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-22 02:51:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:06 -0500
commitaefaa18554a55da5b5d9fdb9815eb246b539c8a2 (patch)
tree3a17a5c8251b1e72a72ea7fdfd96db09face2fc3 /source4/libcli/raw
parentba5d77bebdcf041a3d2b3dd53fb83fe49ecc4100 (diff)
downloadsamba-aefaa18554a55da5b5d9fdb9815eb246b539c8a2.tar.gz
samba-aefaa18554a55da5b5d9fdb9815eb246b539c8a2.tar.bz2
samba-aefaa18554a55da5b5d9fdb9815eb246b539c8a2.zip
r4924: continue the effort to simplify and generalise the composite
interface. This patch removes the "stage" variable, which is really better suited to the backend state structures (This used to be commit 39da684ea8bc72d7a4a12c00eaad56b4f32890a9)
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r--source4/libcli/raw/clisocket.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/libcli/raw/clisocket.c b/source4/libcli/raw/clisocket.c
index e981049535..cbbd6490bd 100644
--- a/source4/libcli/raw/clisocket.c
+++ b/source4/libcli/raw/clisocket.c
@@ -30,6 +30,7 @@
this private structure is used during async connection handling
*/
struct clisocket_connect {
+ int port_num;
int *iports;
struct smbcli_socket *sock;
const char *dest_host;
@@ -95,8 +96,8 @@ static void smbcli_sock_connect_handler(struct event_context *ev, struct fd_even
}
/* that port failed - try the next port */
- for (i=c->stage+1;conn->iports[i];i++) {
- c->stage = i;
+ for (i=conn->port_num+1;conn->iports[i];i++) {
+ conn->port_num = i;
c->status = smbcli_sock_connect_one(conn->sock,
conn->dest_host,
conn->iports[i]);
@@ -204,7 +205,7 @@ struct smbcli_composite *smbcli_sock_connect_send(struct smbcli_socket *sock,
/* startup the connect process for each port in turn until one
succeeds or tells us that it is pending */
for (i=0;conn->iports[i];i++) {
- c->stage = i;
+ conn->port_num = i;
conn->sock->port = conn->iports[i];
c->status = smbcli_sock_connect_one(sock,
conn->dest_host,