diff options
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r-- | source3/smbd/trans2.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index ac282ed95f..4c0d5731eb 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1329,9 +1329,10 @@ static int call_trans2findfirst(connection_struct *conn, char *inbuf, char *outb char *pdata = *ppdata; int dirtype = SVAL(params,0); int maxentries = SVAL(params,2); - BOOL close_after_first = BITSETW(params+4,0); - BOOL close_if_end = BITSETW(params+4,1); - BOOL requires_resume_key = BITSETW(params+4,2); + uint16 findfirst_flags = SVAL(params,4); + BOOL close_after_first = (findfirst_flags & FLAG_TRANS2_FIND_CLOSE); + BOOL close_if_end = (findfirst_flags & FLAG_TRANS2_FIND_CLOSE_IF_END); + BOOL requires_resume_key = (findfirst_flags & FLAG_TRANS2_FIND_REQUIRE_RESUME); int info_level = SVAL(params,6); pstring directory; pstring mask; @@ -1555,10 +1556,11 @@ static int call_trans2findnext(connection_struct *conn, char *inbuf, char *outbu int maxentries = SVAL(params,2); uint16 info_level = SVAL(params,4); uint32 resume_key = IVAL(params,6); - BOOL close_after_request = BITSETW(params+10,0); - BOOL close_if_end = BITSETW(params+10,1); - BOOL requires_resume_key = BITSETW(params+10,2); - BOOL continue_bit = BITSETW(params+10,3); + uint16 findnext_flags = SVAL(params,10); + BOOL close_after_request = (findnext_flags & FLAG_TRANS2_FIND_CLOSE); + BOOL close_if_end = (findnext_flags & FLAG_TRANS2_FIND_CLOSE_IF_END); + BOOL requires_resume_key = (findnext_flags & FLAG_TRANS2_FIND_REQUIRE_RESUME); + BOOL continue_bit = (findnext_flags & FLAG_TRANS2_FIND_CONTINUE); pstring resume_name; pstring mask; pstring directory; |