[Asterisk-code-review] sorcery: Fix sorcery wizard create so it creates in caches (asterisk[13])
George Joseph
asteriskteam at digium.com
Sat Feb 27 19:23:16 CST 2016
George Joseph has posted comments on this change.
Change subject: sorcery: Fix sorcery_wizard_create so it creates in caches
......................................................................
Patch Set 1:
(1 comment)
https://gerrit.asterisk.org/#/c/2312/1/main/sorcery.c
File main/sorcery.c:
Line 1957: return (!object_wizard->wizard->callbacks.create(details->sorcery, object_wizard->data, details->obj) &&
> My only concern with this is that it will cache even if the object is not p
True but someone has to specifically create the cache in the first place. I can't imagine anyone WANTING a cache in front of a non writable backend (except me when I was writing the pjsip_config_wizard. :)) and even if they did I don't think it could hurt anything. There are only a few objects we even call ast_sorcery_create on anyway and they HAVE to be against a writable backend or there was no point.
I COULD iterate over the wizard list to make sure there's at least 1 non-caching wizard with a create function, then iterate over it again to call the creates if there is. Doesn't seem worth it though.
--
To view, visit https://gerrit.asterisk.org/2312
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id5596ce691685a79886e57b0865888458d6e7b46
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list