<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/10149">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Corey Farrell: Looks good to me, but someone else must approve
  Richard Mudgett: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">rtp_engine: rtcp_report_to_json can overflow the ssrc integer value<br><br>When writing an RTCP report to json the code attempts to pack the "ssrc" and<br>"source_ssrc" unsigned integer values as a signed int value type. This of course<br>means if the ssrc's unsigned value is greater than that which can fit into a<br>signed integer value it gets converted to a negative number. Subsequently, the<br>negative value goes out in the json report.<br><br>This patch now packs the value as a json_int_t, which is the widest integer type<br>available on a given system. This should make it so the value no longer<br>overflows.<br><br>Note, this was caught by two failing tests hep/rtcp-receiver/ and<br>hep/rtcp-sender.<br><br>Change-Id: I2af275286ee5e795b79f0c3d450d9e4b28e958b0<br>---<br>M configure<br>M configure.ac<br>M include/asterisk/autoconfig.h.in<br>M include/asterisk/json.h<br>M main/rtp_engine.c<br>M menuselect/configure<br>M third-party/jansson/configure.m4<br>7 files changed, 101 insertions(+), 37 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/configure b/configure</span><br><span>index c984658..e5f7ba5 100755</span><br><span>--- a/configure</span><br><span>+++ b/configure</span><br><span>@@ -1323,7 +1323,6 @@</span><br><span> docdir</span><br><span> oldincludedir</span><br><span> includedir</span><br><span style="color: hsl(0, 100%, 40%);">-runstatedir</span><br><span> localstatedir</span><br><span> sharedstatedir</span><br><span> sysconfdir</span><br><span>@@ -1510,7 +1509,6 @@</span><br><span> sysconfdir='${prefix}/etc'</span><br><span> sharedstatedir='${prefix}/com'</span><br><span> localstatedir='${prefix}/var'</span><br><span style="color: hsl(0, 100%, 40%);">-runstatedir='${localstatedir}/run'</span><br><span> includedir='${prefix}/include'</span><br><span> oldincludedir='/usr/include'</span><br><span> docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'</span><br><span>@@ -1763,15 +1761,6 @@</span><br><span>   | -silent | --silent | --silen | --sile | --sil)</span><br><span>     silent=yes ;;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-  -runstatedir | --runstatedir | --runstatedi | --runstated \</span><br><span style="color: hsl(0, 100%, 40%);">-  | --runstate | --runstat | --runsta | --runst | --runs \</span><br><span style="color: hsl(0, 100%, 40%);">-  | --run | --ru | --r)</span><br><span style="color: hsl(0, 100%, 40%);">-    ac_prev=runstatedir ;;</span><br><span style="color: hsl(0, 100%, 40%);">-  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \</span><br><span style="color: hsl(0, 100%, 40%);">-  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \</span><br><span style="color: hsl(0, 100%, 40%);">-  | --run=* | --ru=* | --r=*)</span><br><span style="color: hsl(0, 100%, 40%);">-    runstatedir=$ac_optarg ;;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)</span><br><span>     ac_prev=sbindir ;;</span><br><span>   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \</span><br><span>@@ -1909,7 +1898,7 @@</span><br><span> for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \</span><br><span>           datadir sysconfdir sharedstatedir localstatedir includedir \</span><br><span>                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \</span><br><span style="color: hsl(0, 100%, 40%);">-              libdir localedir mandir runstatedir</span><br><span style="color: hsl(120, 100%, 40%);">+           libdir localedir mandir</span><br><span> do</span><br><span>   eval ac_val=\$$ac_var</span><br><span>   # Remove trailing slashes.</span><br><span>@@ -2062,7 +2051,6 @@</span><br><span>   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]</span><br><span>   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]</span><br><span>   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]</span><br><span style="color: hsl(0, 100%, 40%);">-  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]</span><br><span>   --libdir=DIR            object code libraries [EPREFIX/lib]</span><br><span>   --includedir=DIR        C header files [PREFIX/include]</span><br><span>   --oldincludedir=DIR     C header files for non-gcc [/usr/include]</span><br><span>@@ -9280,6 +9268,38 @@</span><br><span>  JANSSON_LIB="-L${JANSSON_DIR}/dest/lib -ljansson"</span><br><span>  PBX_JANSSON=1</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+     # We haven't run install yet</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    # Define the ast_json_int_t (large integer type) to match jansson's</span><br><span style="color: hsl(120, 100%, 40%);">+       saved_cppflags="${CPPFLAGS}"</span><br><span style="color: hsl(120, 100%, 40%);">+        CPPFLAGS="${CPPFLAGS} ${JANSSON_INCLUDE}"</span><br><span style="color: hsl(120, 100%, 40%);">+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext</span><br><span style="color: hsl(120, 100%, 40%);">+/* end confdefs.h.  */</span><br><span style="color: hsl(120, 100%, 40%);">+#include <$JANSSON_DIR/source/src/jansson.h></span><br><span style="color: hsl(120, 100%, 40%);">+int</span><br><span style="color: hsl(120, 100%, 40%);">+main ()</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+#if !JSON_INTEGER_IS_LONG_LONG</span><br><span style="color: hsl(120, 100%, 40%);">+             #error "not long long"</span><br><span style="color: hsl(120, 100%, 40%);">+              #endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  ;</span><br><span style="color: hsl(120, 100%, 40%);">+  return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+_ACEOF</span><br><span style="color: hsl(120, 100%, 40%);">+if ac_fn_c_try_compile "$LINENO"; then :</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "#define AST_JSON_INT_T long long" >>confdefs.h</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+else</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "#define AST_JSON_INT_T long" >>confdefs.h</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext</span><br><span style="color: hsl(120, 100%, 40%);">+      CPPFLAGS="${saved_cppflags}"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> </span><br><span> </span><br><span> </span><br><span>@@ -14446,6 +14466,36 @@</span><br><span> $as_echo "$as_me: *** use './configure --with-jansson-bundled'" >&6;}</span><br><span>          exit 1</span><br><span>       fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  # Define the ast_json_int_t (large integer type) to match jansson's</span><br><span style="color: hsl(120, 100%, 40%);">+       saved_cppflags="${CPPFLAGS}"</span><br><span style="color: hsl(120, 100%, 40%);">+        CPPFLAGS="${CPPFLAGS} ${JANSSON_INCLUDE}"</span><br><span style="color: hsl(120, 100%, 40%);">+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext</span><br><span style="color: hsl(120, 100%, 40%);">+/* end confdefs.h.  */</span><br><span style="color: hsl(120, 100%, 40%);">+#include <jansson.h></span><br><span style="color: hsl(120, 100%, 40%);">+int</span><br><span style="color: hsl(120, 100%, 40%);">+main ()</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+#if !JSON_INTEGER_IS_LONG_LONG</span><br><span style="color: hsl(120, 100%, 40%);">+             #error "not long long"</span><br><span style="color: hsl(120, 100%, 40%);">+              #endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  ;</span><br><span style="color: hsl(120, 100%, 40%);">+  return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+_ACEOF</span><br><span style="color: hsl(120, 100%, 40%);">+if ac_fn_c_try_compile "$LINENO"; then :</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "#define AST_JSON_INT_T long long" >>confdefs.h</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+else</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "#define AST_JSON_INT_T long" >>confdefs.h</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext</span><br><span style="color: hsl(120, 100%, 40%);">+      CPPFLAGS="${saved_cppflags}"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> else</span><br><span>     PBX_JANSSON=1</span><br><span> fi</span><br><span>@@ -15063,7 +15113,7 @@</span><br><span>     We can't simply define LARGE_OFF_T to be 9223372036854775807,</span><br><span>     since some C++ compilers masquerading as C compilers</span><br><span>     incorrectly reject 9223372036854775807.  */</span><br><span style="color: hsl(0, 100%, 40%);">-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))</span><br><span style="color: hsl(120, 100%, 40%);">+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))</span><br><span>   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721</span><br><span>                  && LARGE_OFF_T % 2147483647 == 1)</span><br><span>                   ? 1 : -1];</span><br><span>@@ -15109,7 +15159,7 @@</span><br><span>     We can't simply define LARGE_OFF_T to be 9223372036854775807,</span><br><span>     since some C++ compilers masquerading as C compilers</span><br><span>     incorrectly reject 9223372036854775807.  */</span><br><span style="color: hsl(0, 100%, 40%);">-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))</span><br><span style="color: hsl(120, 100%, 40%);">+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))</span><br><span>   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721</span><br><span>                     && LARGE_OFF_T % 2147483647 == 1)</span><br><span>                   ? 1 : -1];</span><br><span>@@ -15133,7 +15183,7 @@</span><br><span>     We can't simply define LARGE_OFF_T to be 9223372036854775807,</span><br><span>     since some C++ compilers masquerading as C compilers</span><br><span>     incorrectly reject 9223372036854775807.  */</span><br><span style="color: hsl(0, 100%, 40%);">-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))</span><br><span style="color: hsl(120, 100%, 40%);">+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))</span><br><span>   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721</span><br><span>                     && LARGE_OFF_T % 2147483647 == 1)</span><br><span>                   ? 1 : -1];</span><br><span>@@ -15178,7 +15228,7 @@</span><br><span>     We can't simply define LARGE_OFF_T to be 9223372036854775807,</span><br><span>     since some C++ compilers masquerading as C compilers</span><br><span>     incorrectly reject 9223372036854775807.  */</span><br><span style="color: hsl(0, 100%, 40%);">-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))</span><br><span style="color: hsl(120, 100%, 40%);">+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))</span><br><span>   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721</span><br><span>                     && LARGE_OFF_T % 2147483647 == 1)</span><br><span>                   ? 1 : -1];</span><br><span>@@ -15202,7 +15252,7 @@</span><br><span>     We can't simply define LARGE_OFF_T to be 9223372036854775807,</span><br><span>     since some C++ compilers masquerading as C compilers</span><br><span>     incorrectly reject 9223372036854775807.  */</span><br><span style="color: hsl(0, 100%, 40%);">-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))</span><br><span style="color: hsl(120, 100%, 40%);">+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))</span><br><span>   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721</span><br><span>                     && LARGE_OFF_T % 2147483647 == 1)</span><br><span>                   ? 1 : -1];</span><br><span>@@ -16502,8 +16552,6 @@</span><br><span>     if (*(data + i) != *(data3 + i))</span><br><span>       return 14;</span><br><span>   close (fd);</span><br><span style="color: hsl(0, 100%, 40%);">-  free (data);</span><br><span style="color: hsl(0, 100%, 40%);">-  free (data3);</span><br><span>   return 0;</span><br><span> }</span><br><span> _ACEOF</span><br><span>diff --git a/configure.ac b/configure.ac</span><br><span>index 94be88b..d1ea560 100644</span><br><span>--- a/configure.ac</span><br><span>+++ b/configure.ac</span><br><span>@@ -698,6 +698,7 @@</span><br><span>                AC_MSG_NOTICE(*** use './configure --with-jansson-bundled')</span><br><span>          exit 1</span><br><span>       fi</span><br><span style="color: hsl(120, 100%, 40%);">+    JANSSON_DEFINE_JSON_INT()</span><br><span> else</span><br><span>    PBX_JANSSON=1</span><br><span> fi</span><br><span>diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in</span><br><span>index 874c205..f0d7903 100644</span><br><span>--- a/include/asterisk/autoconfig.h.in</span><br><span>+++ b/include/asterisk/autoconfig.h.in</span><br><span>@@ -7,6 +7,9 @@</span><br><span> </span><br><span> </span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* Define to 'long' or 'long long' */</span><br><span style="color: hsl(120, 100%, 40%);">+#undef AST_JSON_INT_T</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* Define to 1 if internal poll should be used. */</span><br><span> #undef AST_POLL_COMPAT</span><br><span> </span><br><span>diff --git a/include/asterisk/json.h b/include/asterisk/json.h</span><br><span>index cfd9a29..011359b 100644</span><br><span>--- a/include/asterisk/json.h</span><br><span>+++ b/include/asterisk/json.h</span><br><span>@@ -111,6 +111,11 @@</span><br><span> /*!@{*/</span><br><span> </span><br><span> /*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Primarily used to cast when packing to an "I" type.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+typedef AST_JSON_INT_T ast_json_int_t;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span>  * \brief Initialize the JSON library.</span><br><span>  */</span><br><span> void ast_json_init(void);</span><br><span>diff --git a/main/rtp_engine.c b/main/rtp_engine.c</span><br><span>index f5f32eb..db016fc 100644</span><br><span>--- a/main/rtp_engine.c</span><br><span>+++ b/main/rtp_engine.c</span><br><span>@@ -2521,8 +2521,8 @@</span><br><span>                 char str_lsr[32];</span><br><span> </span><br><span>                snprintf(str_lsr, sizeof(str_lsr), "%u", payload->report->report_block[i]->lsr);</span><br><span style="color: hsl(0, 100%, 40%);">-             json_report_block = ast_json_pack("{s: i, s: i, s: i, s: i, s: i, s: s, s: i}",</span><br><span style="color: hsl(0, 100%, 40%);">-                       "source_ssrc", payload->report->report_block[i]->source_ssrc,</span><br><span style="color: hsl(120, 100%, 40%);">+              json_report_block = ast_json_pack("{s: I, s: i, s: i, s: i, s: i, s: s, s: i}",</span><br><span style="color: hsl(120, 100%, 40%);">+                     "source_ssrc", (ast_json_int_t)payload->report->report_block[i]->source_ssrc,</span><br><span>                     "fraction_lost", payload->report->report_block[i]->lost_count.fraction,</span><br><span>                   "packets_lost", payload->report->report_block[i]->lost_count.packets,</span><br><span>                     "highest_seq_no", payload->report->report_block[i]->highest_seq_no,</span><br><span>@@ -2554,8 +2554,8 @@</span><br><span>               }</span><br><span>    }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   json_rtcp_report = ast_json_pack("{s: i, s: i, s: i, s: o, s: o}",</span><br><span style="color: hsl(0, 100%, 40%);">-            "ssrc", payload->report->ssrc,</span><br><span style="color: hsl(120, 100%, 40%);">+        json_rtcp_report = ast_json_pack("{s: I, s: i, s: i, s: o, s: o}",</span><br><span style="color: hsl(120, 100%, 40%);">+          "ssrc", (ast_json_int_t)payload->report->ssrc,</span><br><span>               "type", payload->report->type,</span><br><span>               "report_count", payload->report->reception_report_count,</span><br><span>             "sender_information", json_rtcp_sender_info ?: ast_json_null(),</span><br><span>diff --git a/menuselect/configure b/menuselect/configure</span><br><span>index fd7d24b..8efb637 100755</span><br><span>--- a/menuselect/configure</span><br><span>+++ b/menuselect/configure</span><br><span>@@ -692,7 +692,6 @@</span><br><span> docdir</span><br><span> oldincludedir</span><br><span> includedir</span><br><span style="color: hsl(0, 100%, 40%);">-runstatedir</span><br><span> localstatedir</span><br><span> sharedstatedir</span><br><span> sysconfdir</span><br><span>@@ -773,7 +772,6 @@</span><br><span> sysconfdir='${prefix}/etc'</span><br><span> sharedstatedir='${prefix}/com'</span><br><span> localstatedir='${prefix}/var'</span><br><span style="color: hsl(0, 100%, 40%);">-runstatedir='${localstatedir}/run'</span><br><span> includedir='${prefix}/include'</span><br><span> oldincludedir='/usr/include'</span><br><span> docdir='${datarootdir}/doc/${PACKAGE}'</span><br><span>@@ -1026,15 +1024,6 @@</span><br><span>   | -silent | --silent | --silen | --sile | --sil)</span><br><span>     silent=yes ;;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-  -runstatedir | --runstatedir | --runstatedi | --runstated \</span><br><span style="color: hsl(0, 100%, 40%);">-  | --runstate | --runstat | --runsta | --runst | --runs \</span><br><span style="color: hsl(0, 100%, 40%);">-  | --run | --ru | --r)</span><br><span style="color: hsl(0, 100%, 40%);">-    ac_prev=runstatedir ;;</span><br><span style="color: hsl(0, 100%, 40%);">-  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \</span><br><span style="color: hsl(0, 100%, 40%);">-  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \</span><br><span style="color: hsl(0, 100%, 40%);">-  | --run=* | --ru=* | --r=*)</span><br><span style="color: hsl(0, 100%, 40%);">-    runstatedir=$ac_optarg ;;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)</span><br><span>     ac_prev=sbindir ;;</span><br><span>   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \</span><br><span>@@ -1172,7 +1161,7 @@</span><br><span> for ac_var in        exec_prefix prefix bindir sbindir libexecdir datarootdir \</span><br><span>           datadir sysconfdir sharedstatedir localstatedir includedir \</span><br><span>                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \</span><br><span style="color: hsl(0, 100%, 40%);">-              libdir localedir mandir runstatedir</span><br><span style="color: hsl(120, 100%, 40%);">+           libdir localedir mandir</span><br><span> do</span><br><span>   eval ac_val=\$$ac_var</span><br><span>   # Remove trailing slashes.</span><br><span>@@ -1325,7 +1314,6 @@</span><br><span>   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]</span><br><span>   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]</span><br><span>   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]</span><br><span style="color: hsl(0, 100%, 40%);">-  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]</span><br><span>   --libdir=DIR            object code libraries [EPREFIX/lib]</span><br><span>   --includedir=DIR        C header files [PREFIX/include]</span><br><span>   --oldincludedir=DIR     C header files for non-gcc [/usr/include]</span><br><span>diff --git a/third-party/jansson/configure.m4 b/third-party/jansson/configure.m4</span><br><span>index d59d861..ec34076 100644</span><br><span>--- a/third-party/jansson/configure.m4</span><br><span>+++ b/third-party/jansson/configure.m4</span><br><span>@@ -74,6 +74,9 @@</span><br><span>  JANSSON_LIB="-L${JANSSON_DIR}/dest/lib -ljansson"</span><br><span>  PBX_JANSSON=1</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+     # We haven't run install yet</span><br><span style="color: hsl(120, 100%, 40%);">+      JANSSON_DEFINE_JSON_INT([$JANSSON_DIR]/source/src/)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>        AC_SUBST([JANSSON_BUNDLED])</span><br><span>  AC_SUBST([PBX_JANSSON])</span><br><span>      AC_SUBST([JANSSON_LIB])</span><br><span>@@ -87,3 +90,19 @@</span><br><span>                 _JANSSON_CONFIGURE()</span><br><span>         fi</span><br><span> ])</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+AC_DEFUN([JANSSON_DEFINE_JSON_INT],</span><br><span style="color: hsl(120, 100%, 40%);">+[</span><br><span style="color: hsl(120, 100%, 40%);">+    # Define the ast_json_int_t (large integer type) to match jansson's</span><br><span style="color: hsl(120, 100%, 40%);">+       saved_cppflags="${CPPFLAGS}"</span><br><span style="color: hsl(120, 100%, 40%);">+        CPPFLAGS="${CPPFLAGS} ${JANSSON_INCLUDE}"</span><br><span style="color: hsl(120, 100%, 40%);">+   AC_COMPILE_IFELSE(</span><br><span style="color: hsl(120, 100%, 40%);">+            [AC_LANG_PROGRAM([#include <$1jansson.h>],</span><br><span style="color: hsl(120, 100%, 40%);">+              [#if !JSON_INTEGER_IS_LONG_LONG</span><br><span style="color: hsl(120, 100%, 40%);">+               #error "not long long"</span><br><span style="color: hsl(120, 100%, 40%);">+              #endif</span><br><span style="color: hsl(120, 100%, 40%);">+                ])],</span><br><span style="color: hsl(120, 100%, 40%);">+          [AC_DEFINE([AST_JSON_INT_T], [long long], [Define to 'long' or 'long long'])],</span><br><span style="color: hsl(120, 100%, 40%);">+                [AC_DEFINE([AST_JSON_INT_T], [long], [Define to 'long' or 'long long'])])</span><br><span style="color: hsl(120, 100%, 40%);">+     CPPFLAGS="${saved_cppflags}"</span><br><span style="color: hsl(120, 100%, 40%);">+])</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10149">change 10149</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/10149"/><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-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I2af275286ee5e795b79f0c3d450d9e4b28e958b0 </div>
<div style="display:none"> Gerrit-Change-Number: 10149 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>