[evolution-mapi] Reverting patches for Bug #608379, it's causing crashers in eds
- From: Milan Crha <mcrha src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution-mapi] Reverting patches for Bug #608379, it's causing crashers in eds
- Date: Thu, 4 Feb 2010 13:49:51 +0000 (UTC)
commit e27c4d58424807e988e4da04f5c419ff5cc60903
Author: Milan Crha <mcrha redhat com>
Date: Thu Feb 4 14:48:43 2010 +0100
Reverting patches for Bug #608379, it's causing crashers in eds
src/libexchangemapi/exchange-mapi-connection.c | 27 +++++++++++++++--------
1 files changed, 17 insertions(+), 10 deletions(-)
---
diff --git a/src/libexchangemapi/exchange-mapi-connection.c b/src/libexchangemapi/exchange-mapi-connection.c
index b59eddd..eae5f67 100644
--- a/src/libexchangemapi/exchange-mapi-connection.c
+++ b/src/libexchangemapi/exchange-mapi-connection.c
@@ -1154,7 +1154,8 @@ exchange_mapi_connection_fetch_items (mapi_id_t fid,
goto cleanup;
}
- GetPropsTagArray = set_SPropTagArray (mem_ctx, 0);
+ GetPropsTagArray = talloc_zero(mem_ctx, struct SPropTagArray);
+ GetPropsTagArray->cValues = 0;
SPropTagArray = set_SPropTagArray(mem_ctx, 0x4,
PR_FID,
@@ -1205,11 +1206,13 @@ exchange_mapi_connection_fetch_items (mapi_id_t fid,
if ((GetPropsList && (cn_props > 0)) || build_name_id) {
struct SPropTagArray *NamedPropsTagArray;
- uint32_t m;
+ uint32_t m, n=0;
struct mapi_nameid *nameid;
nameid = mapi_nameid_new(mem_ctx);
- NamedPropsTagArray = set_SPropTagArray (mem_ctx, 0);
+ NamedPropsTagArray = talloc_zero(mem_ctx, struct SPropTagArray);
+
+ NamedPropsTagArray->cValues = 0;
/* Add named props using callback */
if (build_name_id) {
if (!build_name_id (nameid, build_name_data)) {
@@ -1225,13 +1228,14 @@ exchange_mapi_connection_fetch_items (mapi_id_t fid,
}
}
- for (m = 0; m < NamedPropsTagArray->cValues; m++)
- SPropTagArray_add (mem_ctx, GetPropsTagArray,
- NamedPropsTagArray->aulPropTag[m]);
+ GetPropsTagArray->cValues = (cn_props + NamedPropsTagArray->cValues);
+ GetPropsTagArray->aulPropTag = talloc_array(mem_ctx, uint32_t, (cn_props + NamedPropsTagArray->cValues));
- for (m = 0; m < cn_props; m++)
- SPropTagArray_add (mem_ctx, GetPropsTagArray,
- GetPropsList[m]);
+ for (m = 0; m < NamedPropsTagArray->cValues; m++, n++)
+ GetPropsTagArray->aulPropTag[n] = NamedPropsTagArray->aulPropTag[m];
+
+ for (m = 0; m < cn_props; m++, n++)
+ GetPropsTagArray->aulPropTag[n] = GetPropsList[m];
GetProps_cleanup:
MAPIFreeBuffer (NamedPropsTagArray);
@@ -1282,7 +1286,11 @@ exchange_mapi_connection_fetch_items (mapi_id_t fid,
if (GetPropsTagArray->cValues) {
struct SPropValue *lpProps;
uint32_t prop_count = 0, k;
+
retval = GetProps (&obj_message, GetPropsTagArray, &lpProps, &prop_count);
+
+ /* Conversion from SPropValue to mapi_SPropValue. (no padding here) */
+ properties_array.cValues = prop_count;
properties_array.lpProps = talloc_array (mem_ctx, struct mapi_SPropValue,
prop_count);
for (k=0; k < prop_count; k++)
@@ -1342,7 +1350,6 @@ exchange_mapi_connection_fetch_items (mapi_id_t fid,
result = TRUE;
cleanup:
- MAPIFreeBuffer (GetPropsTagArray);
mapi_object_release(&obj_folder);
mapi_object_release(&obj_table);
mapi_object_release(&obj_store);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]