evolution-mapi r192 - in trunk: . src/libexchangemapi
- From: jkerihuel svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-mapi r192 - in trunk: . src/libexchangemapi
- Date: Wed, 1 Apr 2009 17:04:51 +0000 (UTC)
Author: jkerihuel
Date: Wed Apr 1 17:04:51 2009
New Revision: 192
URL: http://svn.gnome.org/viewvc/evolution-mapi?rev=192&view=rev
Log:
Do not call MAPIUninitialize if profile store creation or
MAPIInitialize fails.
Fix a warning in GetDefaultProfile
Remove commented talloc code
Modified:
trunk/ChangeLog
trunk/src/libexchangemapi/exchange-mapi-connection.c
Modified: trunk/src/libexchangemapi/exchange-mapi-connection.c
==============================================================================
--- trunk/src/libexchangemapi/exchange-mapi-connection.c (original)
+++ trunk/src/libexchangemapi/exchange-mapi-connection.c Wed Apr 1 17:04:51 2009
@@ -93,7 +93,7 @@
if (profname)
profile = profname;
else {
- retval = GetDefaultProfile(&profile);
+ retval = GetDefaultProfile((char **)&profile);
if (retval != MAPI_E_SUCCESS) {
mapi_errstr("GetDefaultProfile", GetLastError());
goto cleanup;
@@ -386,16 +386,12 @@
static gboolean
exchange_mapi_util_write_generic_streams (mapi_object_t *obj_message, GSList *stream_list)
{
-
-// TALLOC_CTX *mem_ctx;
GSList *l;
enum MAPISTATUS retval;
gboolean status = TRUE;
d(g_print("\n%s: Entering %s ", G_STRLOC, G_STRFUNC));
-// mem_ctx = talloc_init ("ExchangeMAPI_WriteGenericStreams");
-
for (l = stream_list; l; l = l->next) {
ExchangeMAPIStream *stream = (ExchangeMAPIStream *) (l->data);
uint32_t total_written;
@@ -457,8 +453,6 @@
mapi_object_release(&obj_stream);
}
-// talloc_free (mem_ctx);
-
d(g_print("\n%s: Leaving %s ", G_STRLOC, G_STRFUNC));
return status;
@@ -2887,7 +2881,11 @@
retval = CreateProfileStore (profpath, LIBMAPI_LDIF_DIR);
if (retval != MAPI_E_SUCCESS) {
manage_mapi_error ("CreateProfileStore", GetLastError(), error_msg);
- goto cleanup;
+ g_free (profpath);
+ g_free (profname);
+
+ UNLOCK ();
+ return FALSE;
}
}
@@ -2897,7 +2895,11 @@
manage_mapi_error ("MAPIInitialize", GetLastError(), error_msg);
else if (retval != MAPI_E_SUCCESS) {
manage_mapi_error ("MAPIInitialize", GetLastError(), error_msg);
- goto cleanup;
+ g_free (profpath);
+ g_free (profname);
+
+ UNLOCK ();
+ return FALSE;
}
/* Delete any existing profiles with the same profilename */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]