summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/smb_macros.h3
-rw-r--r--source3/smbd/globals.h7
-rw-r--r--source3/smbd/smb2_server.c13
3 files changed, 13 insertions, 10 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index 7528883c2d..6dd9cab711 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -339,4 +339,7 @@ extern const char toupper_ascii_fast_table[];
#define toupper_ascii_fast(c) toupper_ascii_fast_table[(unsigned int)(c)];
#endif
+#define smbd_smb2_request_error(req, status) \
+ smbd_smb2_request_error_((req), (status), __location__)
+
#endif /* _SMB_MACROS_H */
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 1c2b628eee..4c90e8f66b 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -176,10 +176,9 @@ void reply_smb2002(struct smb_request *req, uint16_t choice);
void smbd_smb2_first_negprot(struct smbd_server_connection *conn,
const uint8_t *inbuf, size_t size);
-NTSTATUS smbd_smb2_request_error_ex(struct smbd_smb2_request *req,
- NTSTATUS status, DATA_BLOB *info);
-NTSTATUS smbd_smb2_request_error(struct smbd_smb2_request *req,
- NTSTATUS status);
+NTSTATUS smbd_smb2_request_error_(struct smbd_smb2_request *req,
+ NTSTATUS status,
+ const char *wherestr);
NTSTATUS smbd_smb2_request_done_ex(struct smbd_smb2_request *req,
NTSTATUS status,
DATA_BLOB body, DATA_BLOB *dyn);
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 20754fbf9c..5c4bdca3e5 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -583,16 +583,17 @@ static void smbd_smb2_request_writev_done(struct tevent_req *subreq)
talloc_free(mem_pool);
}
-NTSTATUS smbd_smb2_request_error_ex(struct smbd_smb2_request *req,
+static NTSTATUS smbd_smb2_request_error_ex(struct smbd_smb2_request *req,
NTSTATUS status,
+ const char *wherestr,
DATA_BLOB *info)
{
uint8_t *outhdr;
uint8_t *outbody;
int i = req->current_idx;
- DEBUG(10,("smbd_smb2_request_error_ex: idx[%d] status[%s]%s\n",
- i, nt_errstr(status), info ? " +info" : ""));
+ DEBUG(10,("smbd_smb2_request_error_ex: idx[%d] status[%s] at %s |%s|\n",
+ i, nt_errstr(status), wherestr, info ? " +info" : ""));
outhdr = (uint8_t *)req->out.vector[i].iov_base;
@@ -619,10 +620,10 @@ NTSTATUS smbd_smb2_request_error_ex(struct smbd_smb2_request *req,
return smbd_smb2_request_reply(req);
}
-NTSTATUS smbd_smb2_request_error(struct smbd_smb2_request *req,
- NTSTATUS status)
+NTSTATUS smbd_smb2_request_error_(struct smbd_smb2_request *req,
+ NTSTATUS status, const char *wherestr)
{
- return smbd_smb2_request_error_ex(req, status, NULL);
+ return smbd_smb2_request_error_ex(req, status, wherestr, NULL);
}
NTSTATUS smbd_smb2_request_done_ex(struct smbd_smb2_request *req,