summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-05-04 16:16:13 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-05-06 07:51:24 +0200
commitc83aed2568761adda5f4f09e044788557767347e (patch)
tree788e3375781c6180fc62a066ff77c8aa10db359f /source3
parentf1ec28827f61fcb168249aa9855e7f19c65780ae (diff)
downloadsamba-c83aed2568761adda5f4f09e044788557767347e.tar.gz
samba-c83aed2568761adda5f4f09e044788557767347e.tar.bz2
samba-c83aed2568761adda5f4f09e044788557767347e.zip
s3-smbd ntstatus_to_dos() pulls the DOS error codes out internally
This means we don't need to duplicate that logic here. Andrew Bartlett
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/error.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/smbd/error.c b/source3/smbd/error.c
index 5ba751647f..2fb4241968 100644
--- a/source3/smbd/error.c
+++ b/source3/smbd/error.c
@@ -77,11 +77,10 @@ void error_packet_set(char *outbuf, uint8 eclass, uint32 ecode, NTSTATUS ntstatu
smb_fn_name(CVAL(outbuf,smb_com)),
nt_errstr(ntstatus)));
} else {
- /* We're returning a DOS error only. */
- if (NT_STATUS_IS_DOS(ntstatus)) {
- eclass = NT_STATUS_DOS_CLASS(ntstatus);
- ecode = NT_STATUS_DOS_CODE(ntstatus);
- } else if (eclass == 0 && NT_STATUS_V(ntstatus)) {
+ /* We're returning a DOS error only,
+ * nt_status_to_dos() pulls DOS error codes out of the
+ * NTSTATUS */
+ if (NT_STATUS_IS_DOS(ntstatus) || (eclass == 0 && NT_STATUS_V(ntstatus))) {
ntstatus_to_dos(ntstatus, &eclass, &ecode);
}