[Asterisk-code-review] stasis: Allow empty application arguments to move. (...asterisk[13])
Joshua C. Colp
asteriskteam at digium.com
Wed Mar 13 06:12:41 CDT 2019
Joshua C. Colp has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/11143
Change subject: stasis: Allow empty application arguments to move.
......................................................................
stasis: Allow empty application arguments to move.
Change-Id: I1e4d37415f3034abe36496dc30209c2303e6af5c
---
M res/stasis/control.c
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/43/11143/1
diff --git a/res/stasis/control.c b/res/stasis/control.c
index 05f2fd3..c72781f 100644
--- a/res/stasis/control.c
+++ b/res/stasis/control.c
@@ -525,7 +525,11 @@
struct stasis_app_control_move_data *move_data;
size_t size;
- size = sizeof(*move_data) + strlen(app_name) + strlen(app_args) + 2;
+ size = sizeof(*move_data) + strlen(app_name) + 1;
+ if (app_args) {
+ /* Application arguments are optional */
+ size += strlen(app_args) + 1;
+ }
if (!(move_data = ast_calloc(1, size))) {
return -1;
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11143
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I1e4d37415f3034abe36496dc30209c2303e6af5c
Gerrit-Change-Number: 11143
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua C. Colp <jcolp at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190313/5820d96c/attachment.html>
More information about the asterisk-code-review
mailing list