evolution-data-server r9336 - branches/EXCHANGE_MAPI_BRANCH/servers/mapi
- From: msuman svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9336 - branches/EXCHANGE_MAPI_BRANCH/servers/mapi
- Date: Wed, 13 Aug 2008 09:31:16 +0000 (UTC)
Author: msuman
Date: Wed Aug 13 09:31:15 2008
New Revision: 9336
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9336&view=rev
Log:
Use RemoveAllRecipients() before setting RecipientTable in a modify_item call.
Modified:
branches/EXCHANGE_MAPI_BRANCH/servers/mapi/ChangeLog
branches/EXCHANGE_MAPI_BRANCH/servers/mapi/exchange-mapi-connection.c
branches/EXCHANGE_MAPI_BRANCH/servers/mapi/exchange-mapi-connection.h
Modified: branches/EXCHANGE_MAPI_BRANCH/servers/mapi/exchange-mapi-connection.c
==============================================================================
--- branches/EXCHANGE_MAPI_BRANCH/servers/mapi/exchange-mapi-connection.c (original)
+++ branches/EXCHANGE_MAPI_BRANCH/servers/mapi/exchange-mapi-connection.c Wed Aug 13 09:31:15 2008
@@ -877,7 +877,7 @@
/* DON'T f***ing touch this function. */
static void
-exchange_mapi_util_modify_recipients (TALLOC_CTX *mem_ctx, mapi_object_t *obj_message , GSList *recipients)
+exchange_mapi_util_modify_recipients (TALLOC_CTX *mem_ctx, mapi_object_t *obj_message , GSList *recipients, gboolean remove_existing)
{
enum MAPISTATUS retval;
struct SPropTagArray *SPropTagArray = NULL;
@@ -949,6 +949,14 @@
}
}
+ if (remove_existing) {
+ RemoveAllRecipients (obj_message);
+ if (retval != MAPI_E_SUCCESS) {
+ mapi_errstr("RemoveAllRecipients", GetLastError());
+ goto cleanup;
+ }
+ }
+
/* Modify the recipient table */
retval = ModifyRecipients (obj_message, SRowSet);
if (retval != MAPI_E_SUCCESS) {
@@ -2075,7 +2083,7 @@
/* Set recipients if any */
if (recipients) {
- exchange_mapi_util_modify_recipients (mem_ctx, &obj_message, recipients);
+ exchange_mapi_util_modify_recipients (mem_ctx, &obj_message, recipients, FALSE);
}
/* Finally, save all changes */
@@ -2208,7 +2216,7 @@
/* Set recipients if any */
if (recipients) {
- exchange_mapi_util_modify_recipients (mem_ctx, &obj_message, recipients);
+ exchange_mapi_util_modify_recipients (mem_ctx, &obj_message, recipients, TRUE);
}
/* Finally, save all changes */
Modified: branches/EXCHANGE_MAPI_BRANCH/servers/mapi/exchange-mapi-connection.h
==============================================================================
--- branches/EXCHANGE_MAPI_BRANCH/servers/mapi/exchange-mapi-connection.h (original)
+++ branches/EXCHANGE_MAPI_BRANCH/servers/mapi/exchange-mapi-connection.h Wed Aug 13 09:31:15 2008
@@ -29,14 +29,14 @@
#include <libmapi/libmapi.h>
-typedef enum _ExchangeMapiOptions {
+typedef enum {
MAPI_OPTIONS_FETCH_ATTACHMENTS = 1<<0,
MAPI_OPTIONS_FETCH_RECIPIENTS = 1<<1,
MAPI_OPTIONS_FETCH_BODY_STREAM = 1<<2,
MAPI_OPTIONS_FETCH_GENERIC_STREAMS = 1<<3,
MAPI_OPTIONS_DONT_SUBMIT = 1<<4,
MAPI_OPTIONS_GETBESTBODY = 1<<5
-} ExchangeMapiOptions;
+} ExchangeMAPIOptions;
#define MAPI_OPTIONS_FETCH_ALL MAPI_OPTIONS_FETCH_ATTACHMENTS | \
MAPI_OPTIONS_FETCH_RECIPIENTS | \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]