write_fn() should return the number of bytes successfully written.
- this will return STATUS_BUFFER_OVERFLOW if there is more to be read
+ this will return STATUS_BUFFER_OVERFLOW if there is more to be written
from the current fragment
*/
NTSTATUS dcesrv_output(struct dcesrv_connection *dce_conn,
NTSTATUS status;
status = dcesrv_output(dce_conn, conn->socket, dcerpc_write_fn);
- if (!NT_STATUS_IS_OK(status)) {
+ if (NT_STATUS_IS_ERR(status)) {
dcesrv_terminate_connection(dce_conn, "eof on socket");
return;
}