mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
CELGenUserEvent: Fix error message from ast_json_pack
This prevents NULL from being passed into an ast_json_pack call when no extra information is passed to the application which prevents an error message about NULL arguments from being generated. ........ Merged revisions 402755 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402756 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -77,7 +77,7 @@ static int celgenuserevent_exec(struct ast_channel *chan, const char *data)
|
||||
|
||||
blob = ast_json_pack("{s: s, s: {s: s}}",
|
||||
"event", args.event,
|
||||
"extra", "extra", args.extra);
|
||||
"extra", "extra", S_OR(args.extra, ""));
|
||||
if (!blob) {
|
||||
return res;
|
||||
}
|
||||
|
Reference in New Issue
Block a user