[Asterisk-code-review] sorcery: Add ability to insert a wizard in an object type's ... (asterisk[13])

George Joseph asteriskteam at digium.com
Tue May 12 10:21:07 CDT 2015


George Joseph has posted comments on this change.

Change subject: sorcery: Add ability to insert a wizard in an object type's list
......................................................................


Patch Set 5:

(2 comments)

https://gerrit.asterisk.org/#/c/394/5/include/asterisk/sorcery.h
File include/asterisk/sorcery.h:

Line 566: int __ast_sorcery_remove_wizard_mapping(struct ast_sorcery *sorcery,
        : 	const char *type, const char *module, int position);
> Without locking this could be problematic. If something else goes and remov
I could add a note to that effect.


Line 608:  * \warning The wizard will have its reference count bumped so you must
        :  * call ao2_cleanup when you're done with it.
> So, after looking at things both the wizard and the data aren't ao2 and can
Yeah, I was wondering why the tests worked then I realized that when you bump wizard, you're actually bumping internal_wizard because wizard is allocated first in the internal_wizard structure.

I could just add a note in the declaration of internal_wizard that requires wizard to always be declared first in the structure. 

Not sure there's any need to bump data separately if wizard is being bumped.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9d2469a9296b2698082c0989e25e6848dc403b57
Gerrit-PatchSet: 5
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list