From bd7ba65ddab3df4c69ce13957fb202b993365897 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 1 Sep 2001 23:06:57 +0000 Subject: more NTSTATUS changes (This used to be commit 8a49b2f7df46b2c990a980758fe1f3871e8b578e) --- source3/smbd/reply.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'source3') 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) { -- cgit