| 892:02ad5db5ad4d | 893:38800d479cd4 |
|---|---|
| 403 | 403 |
| 404 // check path cache | 404 // check path cache |
| 405 char *cp = strdup(path); | 405 char *cp = strdup(path); |
| 406 //printf("cp: %s\n", cp); | 406 //printf("cp: %s\n", cp); |
| 407 while(strlen(cp) > 1) { | 407 while(strlen(cp) > 1) { |
| 408 char *cached = cxMapGet(sn->pathcache, cx_hash_key_str(cp)); | 408 char *cached = cxMapGet(sn->pathcache, cp); |
| 409 if(cached) { | 409 if(cached) { |
| 410 start = strlen(cp); | 410 start = strlen(cp); |
| 411 begin = start; | 411 begin = start; |
| 412 cxBufferPutString(&href, cached); | 412 cxBufferPutString(&href, cached); |
| 413 break; | 413 break; |
| 619 return NULL; | 619 return NULL; |
| 620 } | 620 } |
| 621 | 621 |
| 622 cxstring p = cx_str(path); | 622 cxstring p = cx_str(path); |
| 623 | 623 |
| 624 DavLock *lock = cxMapGet(locks->resource_locks, cx_hash_key(p.ptr, p.length)); | 624 DavLock *lock = cxMapGet(locks->resource_locks, p); |
| 625 if(lock) { | 625 if(lock) { |
| 626 return lock; | 626 return lock; |
| 627 } | 627 } |
| 628 | 628 |
| 629 CxIterator i = cxListIterator(locks->collection_locks); | 629 CxIterator i = cxListIterator(locks->collection_locks); |
| 645 DavLockManager *locks = get_lock_manager(sn); | 645 DavLockManager *locks = get_lock_manager(sn); |
| 646 if(!locks) { | 646 if(!locks) { |
| 647 return; | 647 return; |
| 648 } | 648 } |
| 649 | 649 |
| 650 if(!cxMapRemove(locks->resource_locks, cx_hash_key_str(path))) { | 650 if(!cxMapRemove(locks->resource_locks, path)) { |
| 651 return; | 651 return; |
| 652 } | 652 } |
| 653 | 653 |
| 654 cxListFindRemove(locks->collection_locks, lock); | 654 cxListFindRemove(locks->collection_locks, lock); |
| 655 } | 655 } |