diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-09-01 23:06:57 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-09-01 23:06:57 +0000 |
commit | bd7ba65ddab3df4c69ce13957fb202b993365897 (patch) | |
tree | aac08cc6f048bee3f0260ea036f1725add73cef1 /source3 | |
parent | d01c23680a7cbd0a4bdc60c82131df5c8cd19f1d (diff) | |
download | samba-bd7ba65ddab3df4c69ce13957fb202b993365897.tar.gz samba-bd7ba65ddab3df4c69ce13957fb202b993365897.tar.bz2 samba-bd7ba65ddab3df4c69ce13957fb202b993365897.zip |
more NTSTATUS changes
(This used to be commit 8a49b2f7df46b2c990a980758fe1f3871e8b578e)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/reply.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index deee0f88f8..8b392e9e0a 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -155,19 +155,6 @@ int reply_special(char *inbuf,char *outbuf) } -/******************************************************************* -work out what error to give to a failed connection -********************************************************************/ - -static int connection_error(char *inbuf,char *outbuf,int ecode) -{ - if (ecode == ERRnoipc || ecode == ERRnosuchshare) - return(ERROR_DOS(ERRDOS,ecode)); - - return(ERROR_DOS(ERRSRV,ecode)); -} - - /**************************************************************************** Reply to a tcon. ****************************************************************************/ @@ -182,7 +169,7 @@ int reply_tcon(connection_struct *conn, int outsize = 0; uint16 vuid = SVAL(inbuf,smb_uid); int pwlen=0; - int ecode = -1; + NTSTATUS ecode; char *p; START_PROFILE(SMBtcon); @@ -231,7 +218,7 @@ int reply_tcon(connection_struct *conn, if (!conn) { END_PROFILE(SMBtcon); - return(connection_error(inbuf,outbuf,ecode)); + return ERROR_NT(ecode); } outsize = set_message(outbuf,2,0,True); @@ -256,7 +243,7 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt pstring user; pstring password; pstring devicename; - int ecode = -1; + NTSTATUS ecode; uint16 vuid = SVAL(inbuf,smb_uid); int passlen = SVAL(inbuf,smb_vwv3); pstring path; @@ -337,7 +324,7 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt if (!conn) { END_PROFILE(SMBtconX); - return(connection_error(inbuf,outbuf,ecode)); + return ERROR_NT(ecode); } if (Protocol < PROTOCOL_NT1) { |