<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11112">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">jansson: Add bogus call at startup to verify required version.<br><br>Add a call to json_sprintf to ensure we're loading with the required<br>version.  Without this it's possible to build Asterisk with jansson-2.11<br>installed but then run on a system with an older copy installed.  This<br>would result in errors on print formats as well as thread safety issues.<br><br>Change-Id: I101aebafe0f9407650206f7c552dad3d69377b5a<br>---<br>M main/json.c<br>1 file changed, 5 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/12/11112/1</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 9a94767..3c6a910 100644</span><br><span>--- a/main/json.c</span><br><span>+++ b/main/json.c</span><br><span>@@ -697,6 +697,11 @@</span><br><span> {</span><br><span>      /* Setup to use Asterisk custom allocators */</span><br><span>        ast_json_reset_alloc_funcs();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       /* We depend on functionality of jansson-2.11 but don't actually use</span><br><span style="color: hsl(120, 100%, 40%);">+       * any symbols.  This call to json_sprintf() forces a linker error if</span><br><span style="color: hsl(120, 100%, 40%);">+  * we somehow try loading with an older jansson library. */</span><br><span style="color: hsl(120, 100%, 40%);">+   json_decref(json_sprintf("%s", ""));</span><br><span> }</span><br><span> </span><br><span> static void json_payload_destructor(void *obj)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11112">change 11112</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/+/11112"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I101aebafe0f9407650206f7c552dad3d69377b5a </div>
<div style="display:none"> Gerrit-Change-Number: 11112 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>