summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb_server.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-11-10 12:59:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:05 -0500
commit389f9dff294310757c8d7bf71bbd403b9ed07b8a (patch)
tree3fbad487a559062584bcdbfc9151349c1bc975b8 /source4/smb_server/smb_server.c
parent042a9958c8967ff106c58847948d27b8824d0a7d (diff)
downloadsamba-389f9dff294310757c8d7bf71bbd403b9ed07b8a.tar.gz
samba-389f9dff294310757c8d7bf71bbd403b9ed07b8a.tar.bz2
samba-389f9dff294310757c8d7bf71bbd403b9ed07b8a.zip
r11640: just a nicer format, and make adding more special cases easier
metze (This used to be commit 5fb5d1a864d9df0ac82fca145b51fdb27406bc97)
Diffstat (limited to 'source4/smb_server/smb_server.c')
-rw-r--r--source4/smb_server/smb_server.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index c8d411af16..0a28023e46 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -450,11 +450,14 @@ static void switch_message(int type, struct smbsrv_request *req)
/* does this protocol need a valid tree connection? */
if ((flags & AS_USER) && !req->tcon) {
- if (type == SMBntcreateX) {
- /* amazingly, the error code depends on the command */
- req_reply_error(req, NT_STATUS_DOS(ERRSRV, ERRinvnid));
- } else {
- req_reply_error(req, NT_STATUS_INVALID_HANDLE);
+ /* amazingly, the error code depends on the command */
+ switch (type) {
+ case SMBntcreateX:
+ req_reply_error(req, NT_STATUS_DOS(ERRSRV, ERRinvnid));
+ break;
+ default:
+ req_reply_error(req, NT_STATUS_INVALID_HANDLE);
+ break;
}
return;
}