]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
CELGenUserEvent: Fix error message from ast_json_pack
authorKinsey Moore <kmoore@digium.com>
Tue, 12 Nov 2013 16:33:24 +0000 (16:33 +0000)
committerKinsey Moore <kmoore@digium.com>
Tue, 12 Nov 2013 16:33:24 +0000 (16:33 +0000)
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.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402755 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_celgenuserevent.c

index 25065dccb26e3a9ab746bcf27858ee2f29965f60..871724679cb7663452c3fa00720c2e506ebd3afb 100644 (file)
@@ -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;
        }