Changeset 4553
- Timestamp:
- Jul 8, 2013 1:44:48 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjlib-util/resolver.c
r4552 r4553 1198 1198 cache = (struct cached_res *) pj_hash_get(resolver->hrescache, key, 1199 1199 sizeof(*key), &hval); 1200 if (cache )1200 if (cache && --cache->ref_cnt <= 0) 1201 1201 free_entry(resolver, cache); 1202 1202 pj_hash_set(NULL, resolver->hrescache, key, sizeof(*key), hval, NULL); … … 1234 1234 cache = (struct cached_res *) pj_hash_get(resolver->hrescache, key, 1235 1235 sizeof(*key), &hval); 1236 if (cache )1236 if (cache && --cache->ref_cnt <= 0) 1237 1237 free_entry(resolver, cache); 1238 1238 pj_hash_set(NULL, resolver->hrescache, key, sizeof(*key), hval, NULL); … … 1244 1244 sizeof(*key), &hval); 1245 1245 if (cache == NULL) { 1246 cache = alloc_entry(resolver); 1247 } else if (cache->ref_cnt > 1) { 1248 /* When cache entry is being used by callback (to app), just decrement 1249 * ref_cnt so it will be freed after the callback returns and allocate 1250 * new entry. 1251 */ 1252 cache->ref_cnt--; 1246 1253 cache = alloc_entry(resolver); 1247 1254 } else {
Note: See TracChangeset
for help on using the changeset viewer.