<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6154">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Support GMIME 3.0<br><br>Support building the Asterisk httpd with version 3.0 of gmime as<br>well as earlier versions of that library.<br><br>ASTERISK-27173<br><br>Change-Id: I7e13dd05a3083ccb0df2dabf83110223f6a9fa8f<br>---<br>M configure<br>M configure.ac<br>M res/res_http_post.c<br>3 files changed, 19 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/configure b/configure<br>index 5507d87..d72e580 100755<br>--- a/configure<br>+++ b/configure<br>@@ -34016,7 +34016,7 @@<br> fi<br> fi<br> <br>-for ver in 2.0 2.2 2.4 2.6; do<br>+for ver in 2.0 2.2 2.4 2.6 3.0; do<br> <br> if test "x${PBX_GMIME}" != "x1" -a "${USE_GMIME}" != "no"; then<br> <br>diff --git a/configure.ac b/configure.ac<br>index bf875a2..ca60fab 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -2512,7 +2512,7 @@<br> fi<br> fi<br> <br>-for ver in 2.0 2.2 2.4 2.6; do<br>+for ver in 2.0 2.2 2.4 2.6 3.0; do<br> AST_PKG_CONFIG_CHECK([GMIME], gmime-$ver)<br> if test "$PBX_GMIME" = 1; then<br> break;<br>diff --git a/res/res_http_post.c b/res/res_http_post.c<br>index 37fc4fa..10db675 100644<br>--- a/res/res_http_post.c<br>+++ b/res/res_http_post.c<br>@@ -57,6 +57,9 @@<br> #ifdef GMIME_TYPE_CONTENT_TYPE<br> #define AST_GMIME_VER_24<br> #endif<br>+#if GMIME_MAJOR_VERSION >= 3<br>+#define AST_GMIME_VER_30<br>+#endif<br> <br> /* just a little structure to hold callback info for gmime */<br> struct mime_cbinfo {<br>@@ -86,7 +89,11 @@<br> <br> stream = g_mime_stream_fs_new(fd);<br> <br>+#ifdef AST_GMIME_VER_30<br>+ content = g_mime_part_get_content(part);<br>+#else<br> content = g_mime_part_get_content_object(part);<br>+#endif<br> g_mime_data_wrapper_write_to_stream(content, stream);<br> g_mime_stream_flush(stream);<br> <br>@@ -109,7 +116,11 @@<br> <br> g_object_unref(stream);<br> <br>- message = g_mime_parser_construct_message(parser);<br>+ message = g_mime_parser_construct_message(parser<br>+#ifdef AST_GMIME_VER_30<br>+ , NULL<br>+#endif<br>+ );<br> <br> g_object_unref(parser);<br> <br>@@ -488,7 +499,11 @@<br> <br> static int load_module(void)<br> {<br>- g_mime_init(0);<br>+ g_mime_init(<br>+#ifndef AST_GMIME_VER_30<br>+ 0<br>+#endif<br>+ );<br> <br> __ast_http_post_load(0);<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6154">change 6154</a>. To unsubscribe, 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/6154"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 14 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I7e13dd05a3083ccb0df2dabf83110223f6a9fa8f </div>
<div style="display:none"> Gerrit-Change-Number: 6154 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Tzafrir Cohen <tzafrir.cohen@xorcom.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>