[Asterisk-code-review] res stasis: Add ability to switch applications. (asterisk[13])

Benjamin Keith Ford asteriskteam at digium.com
Tue Feb 26 14:18:05 CST 2019


Benjamin Keith Ford has posted comments on this change. ( https://gerrit.asterisk.org/10937 )

Change subject: res_stasis: Add ability to switch applications.
......................................................................


Patch Set 6:

(2 comments)

https://gerrit.asterisk.org/#/c/10937/6/res/stasis/control.h
File res/stasis/control.h:

https://gerrit.asterisk.org/#/c/10937/6/res/stasis/control.h@40
PS6, Line 40:  *
            :  * \note This function inherits app's ref rather than bumping app!
            :  * If something goes wrong, ao2_cleanup is called on the app.
> Makes sense you are trying to remove the variable, but I lean toward keeping it for the sake of code […]
I could go either way on it, the variable would be used solely for creating the control and then everything can be done with control getter functions at that point, and the functionality could remain the same for "control_create". I believe the only time that it matters is for this case - all other calls just pass the channel.


https://gerrit.asterisk.org/#/c/10937/6/res/stasis/control.c
File res/stasis/control.c:

https://gerrit.asterisk.org/#/c/10937/6/res/stasis/control.c@86
PS6, Line 86: 	/*!
            : 	 * The list of arguments to pass to StasisStart when moving to another app.
            : 	 */
            : 	char **argv;
            : 	/*!
            : 	 * The number of arguments argv contains.
            : 	 */
            : 	int argc;
> Can you use "AST_VECTOR_STEAL_ELEMENTS"? If you're moving from one to the other the old app no longe […]
I think you're correct. The arguments are only needed for 2 cases: passing to the new application, and if switching applications is not possible. So switching to a vector should be fine and clean up some of the code.



-- 
To view, visit https://gerrit.asterisk.org/10937
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I43d12b10045a98a8d42541889b85695be26f288a
Gerrit-Change-Number: 10937
Gerrit-PatchSet: 6
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation (1000185)
Gerrit-Reviewer: Joshua C. Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Tue, 26 Feb 2019 20:18:05 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190226/419886f1/attachment.html>


More information about the asterisk-code-review mailing list