summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-10-08 16:35:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:33 -0500
commit846f4b304ce0f69ee11ddfe7519e5f024ccf4c11 (patch)
tree24176a15bc0eb7944e72961749daefe694898504 /source4/libcli
parente0c11738ae9cf6a2fd3c3d8f4ec036f615f1f472 (diff)
downloadsamba-846f4b304ce0f69ee11ddfe7519e5f024ccf4c11.tar.gz
samba-846f4b304ce0f69ee11ddfe7519e5f024ccf4c11.tar.bz2
samba-846f4b304ce0f69ee11ddfe7519e5f024ccf4c11.zip
r10836: giving NT_STATUS_NO_MEMORY, when the connection fails wasn't a good idea...
metze (This used to be commit e7ee73a747a025a66ac6563172e51f160bc28e0a)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/wrepl/winsrepl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/libcli/wrepl/winsrepl.c b/source4/libcli/wrepl/winsrepl.c
index 31ef1ffbeb..82abd76665 100644
--- a/source4/libcli/wrepl/winsrepl.c
+++ b/source4/libcli/wrepl/winsrepl.c
@@ -433,6 +433,7 @@ static NTSTATUS wrepl_request_wait(struct wrepl_request *req)
return req->status;
}
+static void wrepl_request_trigger(struct wrepl_request *req);
/*
connect a wrepl_socket to a WINS server
@@ -459,7 +460,13 @@ struct wrepl_request *wrepl_connect_send(struct wrepl_socket *wrepl_socket,
status = socket_connect(wrepl_socket->sock, our_ip, 0, peer_ip,
WINS_REPLICATION_PORT, 0);
- if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) goto failed;
+ if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
+ req->wrepl_socket = wrepl_socket;
+ req->state = WREPL_REQUEST_ERROR;
+ req->status = status;
+ wrepl_request_trigger(req);
+ return req;
+ }
return req;