| 83 | } |
| 84 | |
| 85 | void lcache_htable_destroy(lcache_htable_t *htable, osips_free_f free_f) |
| 86 | { |
| 87 | int i; |
| 88 | lcache_entry_t* me1, *me2; |
| 89 | |
| 90 | if(!htable || !htable->htable) |
| 91 | return; |
| 92 | |
| 93 | for(i = 0; i< htable->size; i++) |
| 94 | { |
| 95 | lock_destroy(&htable->htable[i].lock); |
| 96 | me1 = htable->htable[i].entries; |
| 97 | while(me1) |
| 98 | { |
| 99 | me2 = me1->next; |
| 100 | func_free(free_f, me1); |
| 101 | me1 = me2; |
| 102 | } |
| 103 | } |
| 104 | func_free(free_f, htable->htable); |
| 105 | func_free(free_f, htable); |
| 106 | } |
| 107 | |
| 108 | int lcache_htable_insert(cachedb_con *con,str* attr, str* value, int expires) |
| 109 | { |
no test coverage detected