summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/smb_macros.h2
-rw-r--r--source3/include/srvstr.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index 89d8994eaf..46ca236553 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -131,6 +131,8 @@
/* the remaining number of bytes in smb buffer 'buf' from pointer 'p'. */
#define smb_bufrem(buf, p) (smb_buflen(buf)-PTR_DIFF(p, smb_buf(buf)))
+#define smbreq_bufrem(req, p) (req->buflen - PTR_DIFF(p, req->buf))
+
/* Note that chain_size must be available as an extern int to this macro. */
#define smb_offset(p,buf) (PTR_DIFF(p,buf+4) + chain_size)
diff --git a/source3/include/srvstr.h b/source3/include/srvstr.h
index d2de6805d3..7e7d8a2e92 100644
--- a/source3/include/srvstr.h
+++ b/source3/include/srvstr.h
@@ -27,4 +27,4 @@
#define srvstr_pull_req_talloc(ctx, req_, dest, src, flags) \
pull_string_talloc(ctx, req_->inbuf, req_->flags2, dest, src, \
- smb_bufrem(req_->inbuf, src), flags)
+ smbreq_bufrem(req_, src), flags)