libmapi: partial fix for bug #336
authorBrad Hards <bradh@openchange.org>
Thu, 12 May 2011 08:45:48 +0000 (08:45 +0000)
committerBrad Hards <bradh@openchange.org>
Thu, 12 May 2011 08:45:48 +0000 (08:45 +0000)
This has some gross gcc pragma stuff to hide the deprecation
warning.

libmapi/IMSProvider.c
libmapi/libmapi.h

index db0b1b2a0eb7a962890368930fde445df1f69c22..20c636622d413a746be2c16ddfca3d7877f77bbe 100644 (file)
@@ -25,6 +25,8 @@
 #include <core/error.h>
 #include <param.h>
 
+#define TEVENT_DEPRECATED 1
+#include <tevent.h>
 
 /**
    \file IMSProvider.c
@@ -36,6 +38,7 @@
  * Log MAPI to one instance of a message store provider
  */
 
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 static NTSTATUS provider_rpc_connection(TALLOC_CTX *parent_ctx, 
                                        struct dcerpc_pipe **p, 
                                        const char *binding,
@@ -52,6 +55,7 @@ static NTSTATUS provider_rpc_connection(TALLOC_CTX *parent_ctx,
        }
 
        ev = tevent_context_init(talloc_autofree_context());
+       tevent_loop_allow_nesting(ev);
 
        status = dcerpc_pipe_connect(parent_ctx, 
                                     p, binding, table,
@@ -66,6 +70,7 @@ static NTSTATUS provider_rpc_connection(TALLOC_CTX *parent_ctx,
        errno = 0;
        return status;
 }
+#pragma GCC diagnostic warning "-Wdeprecated-declarations"
 
 
 /**
index bd620e1f5c4c32ab7ad8d1e05bfe97d06c1cc2d6..4da1c333f9aac4902e986f1e7bc1d4aa2551a61d 100644 (file)
@@ -48,7 +48,6 @@
 #include <talloc.h>
 #include <dcerpc.h>
 #include <util/debug.h>
-#include <tevent.h>
 #include <param.h>
 #include <dlinklist.h>