Changeset 967
- Timestamp:
- Aug 19, 2016, 3:13:31 PM (9 years ago)
- Location:
- trunk/client/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/src/dircache.c
r965 r967 88 88 pdce->ulHash = computehash (path); 89 89 pdce->ulLastUpdateTime = 0; 90 pdce->pdc = pdc;91 90 pdce->fInvalid = 0; 92 91 … … 267 266 } 268 267 269 static void dcRemoveEntry (DirectoryCacheEntry *pdce) 270 { 271 DirectoryCache *pdc = pdce->pdc; 272 268 static void dcRemoveEntry (DirectoryCache *pdc, DirectoryCacheEntry *pdce) 269 { 273 270 if (pdce->pNext) 274 271 { … … 295 292 } 296 293 297 static void dcInsertEntry (DirectoryCacheEntry *pdce) 298 { 299 DirectoryCache *pdc = pdce->pdc; 300 294 static void dcInsertEntry (DirectoryCache *pdc, DirectoryCacheEntry *pdce) 295 { 301 296 pdce->pNext = pdc->pEntriesHead; 302 297 … … 371 366 { 372 367 debuglocal(pdc->resource, 9, "dcRead: expired\n"); 373 dcRemoveEntry (pdc e);368 dcRemoveEntry (pdc, pdce); 374 369 dceDelete (pdce); 375 370 } … … 415 410 dceClear (pdce); 416 411 /* Remove the entry from list. It will be added again in dircache_write_end. */ 417 dcRemoveEntry (pdc e);412 dcRemoveEntry (pdc, pdce); 418 413 } 419 414 … … 440 435 while (pdce) 441 436 { 442 dcRemoveEntry (pdc e);437 dcRemoveEntry (pdc, pdce); 443 438 dceDelete (pdce); 444 439 … … 604 599 /* Remove oldest entry. */ 605 600 pdce = pdc->pEntriesTail; 606 dcRemoveEntry (pdc e);601 dcRemoveEntry (pdc, pdce); 607 602 dceDelete (pdce); 608 603 pdce = NULL; … … 629 624 } 630 625 631 lockRequest (pdc e->pdc->mutex);626 lockRequest (pdc->mutex); 632 627 633 628 dceWriteEntry (pdc, pdce, finfo); 634 629 635 lockRelease (pdc e->pdc->mutex);630 lockRelease (pdc->mutex); 636 631 } 637 632 … … 657 652 { 658 653 dceAdjust (pdc, pdce); 659 dcInsertEntry (pdc e);654 dcInsertEntry (pdc, pdce); 660 655 } 661 656 -
trunk/client/src/dircache.h
r965 r967 38 38 struct DirectoryCacheEntry *pNext; 39 39 struct DirectoryCacheEntry *pPrev; 40 41 struct DirectoryCache *pdc;42 40 43 41 smbwrp_fileinfo *aInfos;
Note:
See TracChangeset
for help on using the changeset viewer.