diff options
author | Jeremy Allison <jra@samba.org> | 2014-01-11 14:48:00 -0800 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2014-01-15 09:45:09 +0100 |
commit | 5afc25eceb0c0e031bbe162617309178f3bcc425 (patch) | |
tree | 2d32967ec23e97a7207782bcbf6d1fcb2b5449f9 /source3 | |
parent | 584de2078d3320ba2e232e5f504191616347d0d7 (diff) | |
download | samba-5afc25eceb0c0e031bbe162617309178f3bcc425.tar.gz samba-5afc25eceb0c0e031bbe162617309178f3bcc425.tar.xz samba-5afc25eceb0c0e031bbe162617309178f3bcc425.zip |
s3:dir - Introduce a function to map a directory cookie to a 32-bit wire cookie.
Make this an identity for now.
https://bugzilla.samba.org/show_bug.cgi?id=2662
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/dir.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 38da2ca547..fb2ad88f75 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -895,6 +895,15 @@ void dptr_init_search_op(struct dptr_struct *dptr) } /**************************************************************************** + Map a native directory offset to a 32-bit cookie. +****************************************************************************/ + +static uint32_t map_dir_offset_to_wire(struct dptr_struct *dptr, long offset) +{ + return (uint32_t)offset; +} + +/**************************************************************************** Fill the 5 byte server reserved dptr field. ****************************************************************************/ @@ -908,7 +917,7 @@ bool dptr_fill(struct smbd_server_connection *sconn, DEBUG(1,("filling null dirptr %d\n",key)); return(False); } - wire_offset = (uint32_t)TellDir(dptr->dir_hnd); + wire_offset = map_dir_offset_to_wire(dptr,TellDir(dptr->dir_hnd)); DEBUG(6,("fill on key %u dirptr 0x%lx now at %d\n",key, (long)dptr->dir_hnd,(int)wire_offset)); buf[0] = key; |