It's good to remember the first error we got and makes sure we don't try
any further io on the connection.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
talloc_free(e->mem_ctx);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(e->mem_ctx);
if (!NT_STATUS_IS_OK(status)) {
+ smbXsrv_connection_disconnect_transport(xconn,
+ status);
return status;
}
continue;
return status;
}
continue;
return NT_STATUS_OK;
}
if (err != 0) {
return NT_STATUS_OK;
}
if (err != 0) {
- return map_nt_error_from_unix_common(err);
+ status = map_nt_error_from_unix_common(err);
+ smbXsrv_connection_disconnect_transport(xconn,
+ status);
+ return status;
}
ok = iov_advance(&e->vector, &e->count, ret);
}
ok = iov_advance(&e->vector, &e->count, ret);
ret = recvmsg(xconn->transport.sock, &msg, 0);
if (ret == 0) {
/* propagate end of file */
ret = recvmsg(xconn->transport.sock, &msg, 0);
if (ret == 0) {
/* propagate end of file */
- return NT_STATUS_END_OF_FILE;
+ status = NT_STATUS_END_OF_FILE;
+ smbXsrv_connection_disconnect_transport(xconn,
+ status);
+ return status;
}
err = socket_error_from_errno(ret, errno, &retry);
if (retry) {
}
err = socket_error_from_errno(ret, errno, &retry);
if (retry) {
return NT_STATUS_OK;
}
if (err != 0) {
return NT_STATUS_OK;
}
if (err != 0) {
- return map_nt_error_from_unix_common(err);
+ status = map_nt_error_from_unix_common(err);
+ smbXsrv_connection_disconnect_transport(xconn,
+ status);
+ return status;
}
if (ret < state->vector.iov_len) {
}
if (ret < state->vector.iov_len) {