s3:smbd: add nt_status_np_pipe()
[samba.git] / source3 / smbd / ipc.c
index 36c29164f069837743fe8a2d08d7a9bb4ae11917..c795d289eab0011a0353b720b187482e2ead6c6a 100644 (file)
@@ -79,6 +79,17 @@ static void copy_trans_params_and_data(char *outbuf, int align,
                memcpy(copy_into, &rdata[data_offset], data_len);
 }
 
+NTSTATUS nt_status_np_pipe(NTSTATUS status)
+{
+       if (NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_DISCONNECTED)) {
+               status = NT_STATUS_PIPE_DISCONNECTED;
+       } else if (NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_RESET)) {
+               status = NT_STATUS_PIPE_BROKEN;
+       }
+
+       return status;
+}
+
 /****************************************************************************
  Send a trans reply.
  ****************************************************************************/