[Asterisk-code-review] res sorcery meory cache: Add support for refreshing stale ob... (asterisk[master])

Joshua Colp asteriskteam at digium.com
Wed May 27 11:53:06 CDT 2015


Joshua Colp has posted comments on this change.

Change subject: res_sorcery_meory_cache: Add support for refreshing stale objects.
......................................................................


Patch Set 2: Code-Review-1

(4 comments)

https://gerrit.asterisk.org/#/c/540/2/res/res_sorcery_memory_cache.c
File res/res_sorcery_memory_cache.c:

Line 584: 	char type[0];
This isn't needed. You can call ast_sorcery_object_get_type on the object.


Line 600: 	task_data = ao2_alloc(sizeof(*task_data) + strlen(type) + 1,
Does this need to be alloced with a lock?


Line 606: 	task_data->sorcery = sorcery;
Should probably hold a ref to the sorcery instance as well.


Line 671: 	if (elapsed.tv_sec > cache->object_lifetime_stale) {
What happens if stale has not been set?


-- 
To view, visit https://gerrit.asterisk.org/540
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9bd7c049adf6939bfe2899f393c2bfbbf412d217
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list