|
|
329b04 |
commit f3b832780fb70066f5eb5c62996d613e6d187c59
|
|
|
329b04 |
Author: Milan Crha <mcrha@redhat.com>
|
|
|
329b04 |
Date: Mon May 18 14:30:06 2015 +0200
|
|
|
329b04 |
|
|
|
329b04 |
Fix a build break with OpenChange 2.3 QueryRows() API change
|
|
|
329b04 |
|
|
|
329b04 |
diff --git a/configure.ac b/configure.ac
|
|
|
329b04 |
index 8adb57d..ac11615 100644
|
|
|
329b04 |
--- a/configure.ac
|
|
|
329b04 |
+++ b/configure.ac
|
|
|
329b04 |
@@ -229,6 +229,21 @@ fi
|
|
|
329b04 |
AC_MSG_RESULT([$ac_cv_have_ecrpcfailed])
|
|
|
329b04 |
|
|
|
329b04 |
dnl ****************************
|
|
|
329b04 |
+dnl Check for OpenChange 2.3 QueryRows
|
|
|
329b04 |
+dnl ****************************
|
|
|
329b04 |
+AC_MSG_CHECKING([libmapi QueryRows arguments])
|
|
|
329b04 |
+save_cflags=$CFLAGS; CFLAGS=$LIBMAPI_CFLAGS
|
|
|
329b04 |
+save_libs=$LIBS; LIBS="$LIBMAPI_LIBS"
|
|
|
329b04 |
+AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
|
|
329b04 |
+ [[#include <libmapi/libmapi.h>]],
|
|
|
329b04 |
+ [[QueryRows(NULL, 1, TBL_ADVANCE, TBL_FORWARD_READ, NULL);]])],
|
|
|
329b04 |
+ [AC_DEFINE(HAVE_QUERYROWS_FORWARDREAD, 1, [libmapi defines QueryRows with ForwardRead argument]) ac_cv_have_queryrows_forwardread=yes],[ac_cv_have_queryrows_forwardread=no])
|
|
|
329b04 |
+CFLAGS=$save_cflags
|
|
|
329b04 |
+LIBS=$save_libs
|
|
|
329b04 |
+AC_MSG_RESULT([$ac_cv_have_queryrows_forwardread])
|
|
|
329b04 |
+
|
|
|
329b04 |
+
|
|
|
329b04 |
+dnl ****************************
|
|
|
329b04 |
dnl Expose version information
|
|
|
329b04 |
dnl ****************************
|
|
|
329b04 |
API_VERSION=$EDS_PACKAGE
|
|
|
329b04 |
diff --git a/src/libexchangemapi/e-mapi-connection.c b/src/libexchangemapi/e-mapi-connection.c
|
|
|
329b04 |
index bf4945f..8067e25 100644
|
|
|
329b04 |
--- a/src/libexchangemapi/e-mapi-connection.c
|
|
|
329b04 |
+++ b/src/libexchangemapi/e-mapi-connection.c
|
|
|
329b04 |
@@ -1523,7 +1523,11 @@ foreach_tablerow (EMapiConnection *conn,
|
|
|
329b04 |
break;
|
|
|
329b04 |
|
|
|
329b04 |
/* Fill the table columns with data from the rows */
|
|
|
329b04 |
- ms = QueryRows (obj_table, count, TBL_ADVANCE, &SRowSet);
|
|
|
329b04 |
+ ms = QueryRows (obj_table, count, TBL_ADVANCE,
|
|
|
329b04 |
+ #ifdef HAVE_QUERYROWS_FORWARDREAD
|
|
|
329b04 |
+ TBL_FORWARD_READ,
|
|
|
329b04 |
+ #endif
|
|
|
329b04 |
+ &SRowSet);
|
|
|
329b04 |
if (ms != MAPI_E_SUCCESS) {
|
|
|
329b04 |
make_mapi_error (perror, "QueryRows", ms);
|
|
|
329b04 |
break;
|