]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_sorcery_memory_cache.c: Replace inline code with function. 64/1364/1
authorRichard Mudgett <rmudgett@digium.com>
Thu, 1 Oct 2015 19:30:06 +0000 (14:30 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 1 Oct 2015 22:27:42 +0000 (17:27 -0500)
Make sorcery_memory_cache_close() call remove_all_from_cache() instead of
partially inlining it.

ASTERISK-25441

Change-Id: I1aa6cb425b1a4307096f3f914d17af8ec179a74c

res/res_sorcery_memory_cache.c

index a9634e8465f7997eab0f08cc01aece3add9b3a81..2e909dc394d025c7240ee4e83d3bc45813f19eab 100644 (file)
@@ -1061,9 +1061,7 @@ static void sorcery_memory_cache_close(void *data)
                 * a prolonged period of time.
                 */
                ao2_wrlock(cache->objects);
-               ao2_callback(cache->objects, OBJ_UNLINK | OBJ_NOLOCK | OBJ_NODATA | OBJ_MULTIPLE,
-                       NULL, NULL);
-               AST_SCHED_DEL_UNREF(sched, cache->expire_id, ao2_ref(cache, -1));
+               remove_all_from_cache(cache);
                ao2_unlock(cache->objects);
        }