From fab898f9cd06d136efbd2f1de047c744bdd1fd07 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 26 Mar 2001 22:20:43 +0000 Subject: Patch from Sean.Batt@anu.edu.au to ensure error reporting is done before any code that could modify errno is called. Jeremy. (This used to be commit 109a174de9e23ccc89ae17d6b5b425b5947c8565) --- source3/smbd/error.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/smbd/error.c b/source3/smbd/error.c index d879f9a93c..472a8d8fd1 100644 --- a/source3/smbd/error.c +++ b/source3/smbd/error.c @@ -119,6 +119,9 @@ int error_packet(char *inbuf,char *outbuf,int error_class,uint32 error_code,int int cmd = CVAL(inbuf,smb_com); int flgs2 = SVAL(outbuf,smb_flg2); + if (errno != 0) + DEBUG(3,("error string = %s\n",strerror(errno))); + if ((flgs2 & FLAGS2_32_BIT_ERROR_CODES) == FLAGS2_32_BIT_ERROR_CODES) { SIVAL(outbuf,smb_rcls,error_code); @@ -139,8 +142,5 @@ int error_packet(char *inbuf,char *outbuf,int error_class,uint32 error_code,int } - if (errno != 0) - DEBUG(3,("error string = %s\n",strerror(errno))); - return(outsize); } -- cgit