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

Joshua C. Colp asteriskteam at digium.com
Thu Jan 31 11:15:03 CST 2019


Joshua C. Colp has posted comments on this change. ( https://gerrit.asterisk.org/10937 )

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


Patch Set 2: Code-Review-1

(3 comments)

https://gerrit.asterisk.org/#/c/10937/2/res/res_stasis.c
File res/res_stasis.c:

https://gerrit.asterisk.org/#/c/10937/2/res/res_stasis.c@1332
PS2, Line 1332: 			RAII_VAR(struct stasis_app *, next_app, NULL, ao2_cleanup);
Needless RAII_VAR usage :P


https://gerrit.asterisk.org/#/c/10937/2/res/res_stasis.c@1384
PS2, Line 1384: 				if (next_app) {
              : 					ast_log(LOG_ERROR, "Could not move to Stasis app '%s' - not registered\n",
              : 						control_next_app(control));
              : 				} else {
              : 					ast_log(LOG_ERROR, "Could not move to Stasis app '%s' - not active\n",
              : 						control_next_app(control));
              : 				}
I'm wondering about this from a usage perspective - as a user using the API I think there needs to be a message or something that indicates it couldn't be moved, so that the application can then react accordingly. If there's no event then it could be complex in the application to handle it.

Ideally the HTTP response would indicate this, but I don't know if this is possible.


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

https://gerrit.asterisk.org/#/c/10937/2/res/stasis/control.h@41
PS2, Line 41:  * \note This function inherits app's ref rather than bumping app!
What about in an error case? It seems as though it's possible to leak the app in some cases.



-- 
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: 2
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation (1000185)
Gerrit-Reviewer: Joshua C. Colp <jcolp at digium.com>
Gerrit-Comment-Date: Thu, 31 Jan 2019 17:15:03 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190131/325de64f/attachment.html>


More information about the asterisk-code-review mailing list