<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13450">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Corey Farrell: Looks good to me, but someone else must approve
Sean Bright: Looks good to me, but someone else must approve
Joshua C. Colp: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">json: Support older jansson versions.<br><br>The use of '?' is a fairly new addition to jansson and is not<br>supported in the version of jansson that can be used by 13.<br>This change returns to previous supported behavior and removes<br>usage of '?'.<br><br>ASTERISK-28663<br><br>Change-Id: I6d596007ae85e8724d928865d99968f679be1142<br>---<br>M main/json.c<br>M res/res_stasis_playback.c<br>M res/res_stasis_recording.c<br>M res/stasis/app.c<br>4 files changed, 8 insertions(+), 8 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/json.c b/main/json.c</span><br><span>index 16137e0..dd2910e 100644</span><br><span>--- a/main/json.c</span><br><span>+++ b/main/json.c</span><br><span>@@ -895,12 +895,12 @@</span><br><span> struct ast_json *ast_json_dialplan_cep_app(</span><br><span> const char *context, const char *exten, int priority, const char *app_name, const char *app_data)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- return ast_json_pack("{s: s?, s: s?, s: o, s: s?, s: s?}",</span><br><span style="color: hsl(0, 100%, 40%);">- "context", context,</span><br><span style="color: hsl(0, 100%, 40%);">- "exten", exten,</span><br><span style="color: hsl(120, 100%, 40%);">+ return ast_json_pack("{s: o, s: o, s: o, s: o, s: o}",</span><br><span style="color: hsl(120, 100%, 40%);">+ "context", context ? ast_json_string_create(context) : ast_json_null(),</span><br><span style="color: hsl(120, 100%, 40%);">+ "exten", exten ? ast_json_string_create(exten) : ast_json_null(),</span><br><span> "priority", priority != -1 ? ast_json_integer_create(priority) : ast_json_null(),</span><br><span style="color: hsl(0, 100%, 40%);">- "app_name", app_name,</span><br><span style="color: hsl(0, 100%, 40%);">- "app_data", app_data</span><br><span style="color: hsl(120, 100%, 40%);">+ "app_name", app_name ? ast_json_string_create(app_name) : ast_json_null(),</span><br><span style="color: hsl(120, 100%, 40%);">+ "app_data", app_data ? ast_json_string_create(app_data) : ast_json_null()</span><br><span> );</span><br><span> }</span><br><span> </span><br><span>diff --git a/res/res_stasis_playback.c b/res/res_stasis_playback.c</span><br><span>index 8145e40..9e8311f 100644</span><br><span>--- a/res/res_stasis_playback.c</span><br><span>+++ b/res/res_stasis_playback.c</span><br><span>@@ -105,7 +105,7 @@</span><br><span> return NULL;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- return ast_json_pack("{s: s, s: o?, s: O}",</span><br><span style="color: hsl(120, 100%, 40%);">+ return ast_json_pack("{s: s, s: o, s: O}",</span><br><span> "type", type,</span><br><span> "timestamp", ast_json_timeval(*stasis_message_timestamp(message), NULL),</span><br><span> "playback", blob);</span><br><span>diff --git a/res/res_stasis_recording.c b/res/res_stasis_recording.c</span><br><span>index c21af2a..4805703 100644</span><br><span>--- a/res/res_stasis_recording.c</span><br><span>+++ b/res/res_stasis_recording.c</span><br><span>@@ -91,7 +91,7 @@</span><br><span> return NULL;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- return ast_json_pack("{s: s, s: o?, s: O}",</span><br><span style="color: hsl(120, 100%, 40%);">+ return ast_json_pack("{s: s, s: o, s: O}",</span><br><span> "type", type,</span><br><span> "timestamp", ast_json_timeval(*stasis_message_timestamp(message), NULL),</span><br><span> "recording", blob);</span><br><span>diff --git a/res/stasis/app.c b/res/stasis/app.c</span><br><span>index 8e719a1..c1b7fae 100644</span><br><span>--- a/res/stasis/app.c</span><br><span>+++ b/res/stasis/app.c</span><br><span>@@ -1164,7 +1164,7 @@</span><br><span> </span><br><span> ast_verb(1, "Replacing Stasis app '%s'\n", app->name);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- msg = ast_json_pack("{s: s, s: o?, s: s}",</span><br><span style="color: hsl(120, 100%, 40%);">+ msg = ast_json_pack("{s: s, s: o, s: s}",</span><br><span> "type", "ApplicationReplaced",</span><br><span> "timestamp", ast_json_timeval(ast_tvnow(), NULL),</span><br><span> "application", app->name);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13450">change 13450</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/13450"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I6d596007ae85e8724d928865d99968f679be1142 </div>
<div style="display:none"> Gerrit-Change-Number: 13450 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Joshua C. Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua C. Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>