summaryrefslogtreecommitdiff
path: root/source3/smbd/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/error.c')
-rw-r--r--source3/smbd/error.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/smbd/error.c b/source3/smbd/error.c
index 913f2ac266..3c829deb09 100644
--- a/source3/smbd/error.c
+++ b/source3/smbd/error.c
@@ -25,6 +25,22 @@
int unix_ERR_class=SMB_SUCCESS;
int unix_ERR_code=0;
+/****************************************************************************
+ Create an error packet from a cached error.
+****************************************************************************/
+
+int cached_error_packet(char *outbuf,files_struct *fsp,int line,const char *file)
+{
+ write_bmpx_struct *wbmpx = fsp->wbmpx_ptr;
+
+ int32 eclass = wbmpx->wr_errclass;
+ int32 err = wbmpx->wr_error;
+
+ /* We can now delete the auxiliary struct */
+ free((char *)wbmpx);
+ fsp->wbmpx_ptr = NULL;
+ return error_packet(outbuf,NT_STATUS_OK,eclass,err,line,file);
+}
struct
{