<p>Tzafrir Cohen has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6155">View Change</a></p><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;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/55/6155/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/configure b/configure<br>index 7618f1d..36a567d 100755<br>--- a/configure<br>+++ b/configure<br>@@ -33250,7 +33250,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 f40403e..cea7c29 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -2492,7 +2492,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 2ee792a..3e1ed03 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/6155">change 6155</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/6155"/><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: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I7e13dd05a3083ccb0df2dabf83110223f6a9fa8f </div>
<div style="display:none"> Gerrit-Change-Number: 6155 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Tzafrir Cohen <tzafrir.cohen@xorcom.com> </div>