summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/raw/rawrequest.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index 139f031178..4191d3775e 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -269,13 +269,17 @@ static void cli_req_grow_data(struct cli_request *req, unsigned new_size)
*/
BOOL cli_request_send(struct cli_request *req)
{
+ uint_t ret;
+
if (IVAL(req->out.buffer, 0) == 0) {
_smb_setlen(req->out.buffer, req->out.size - NBT_HDR_SIZE);
}
cli_request_calculate_sign_mac(req);
- if (req->out.size != cli_sock_write(req->transport->socket, req->out.buffer, req->out.size)) {
+ ret = cli_sock_write(req->transport->socket, req->out.buffer, req->out.size);
+
+ if (req->out.size != ret) {
req->transport->error.etype = ETYPE_SOCKET;
req->transport->error.e.socket_error = SOCKET_WRITE_ERROR;
DEBUG(0,("Error writing %d bytes to server - %s\n",