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 | 8a49b2f7df46b2c990a980758fe1f3871e8b578e (patch) | |
tree | cd9498458c2c8abe2e6bed568d03ea7ab7d0fb0d /source/smbd/reply.c | |
parent | 52f5abae4667d841be7ca8f5ff0f25ba6d027067 (diff) | |
download | samba-8a49b2f7df46b2c990a980758fe1f3871e8b578e.tar.gz samba-8a49b2f7df46b2c990a980758fe1f3871e8b578e.tar.xz samba-8a49b2f7df46b2c990a980758fe1f3871e8b578e.zip |
more NTSTATUS changes
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r-- | source/smbd/reply.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c index deee0f88f8c..8b392e9e0a9 100644 --- a/source/smbd/reply.c +++ b/source/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) { |