Ignore:
Timestamp:
Aug 19, 2016, 2:24:06 PM (9 years ago)
Author:
Yuri Dario
Message:

Samba code changes for using new dircache API. ticket#274.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/src/smbwrp.c

    r960 r966  
    2626#include "libsmb/clirap.h"
    2727#include "trans2.h"
     28
     29#include "dircache.h"
    2830#include "smbwrp.h"
    2931
     
    806808
    807809        // Try to get the listing from cache.
    808         if (dircache_list_files(fn, state, &num_finfo))
     810        if (dircache_list_files(pRes->pdc, fn, state->plist,
     811                                state->mask, (char*) state->fullpath, &num_finfo))
    809812           return(num_finfo); // Got from cache
    810813
     
    838841           goto fail;
    839842
    840         dircachectx = dircache_write_begin(state, num_finfo);
     843        dircachectx = dircache_write_begin(pRes->pdc, state->mask,
     844                                           (char*) state->fullpath, num_finfo);
    841845
    842846        debuglocal(pRes, 4,"list_files: got %d files\n", num_finfo);
     
    854858           fn(cli->dfs_mountpoint, &wrpfinfo, mask, state);
    855859           // Also add the entry to the cache.
    856            dircache_write_entry(pRes, dircachectx, &wrpfinfo);
    857         }
    858 
    859         dircache_write_end(pRes, dircachectx);
     860           dircache_write_entry(pRes->pdc, dircachectx, &wrpfinfo);
     861        }
     862
     863        dircache_write_end(pRes->pdc, dircachectx);
     864
    860865 fail:
    861866        TALLOC_FREE(frame);
     
    988993}
    989994
    990 
    991 #pragma pack(1)
    992 typedef struct _FEA
    993 {
    994         unsigned char fEA;      // flags
    995         unsigned char cbName;   // name length not including NULL
    996         unsigned short cbValue; // value length
    997 } FEA;
    998 
    999 typedef struct _FEALIST
    1000 {
    1001         unsigned long cbList;   // total bytes of structure including full list
    1002         FEA list[1];            // variable length FEA structures
    1003 } FEALIST;
    1004 #pragma pack()
    1005995
    1006996static int unilistea(Resource *pRes, cli_state * cli, char *fname, void * buffer, unsigned long size)
Note: See TracChangeset for help on using the changeset viewer.