[evolution-patches] patch for exchange connector 1.4 branch
- From: Harry Lu <harry lu sun com>
- To: evolution-patches <evolution-patches ximian com>
- Subject: [evolution-patches] patch for exchange connector 1.4 branch
- Date: Thu, 24 Jun 2004 15:39:51 +0800
Dan and others,
Here is a patch to fix a crash for exchange connecotr 1.4 branch.
Please review it.
Harry
Test Case:
1. User A set User B as his Delegate.
2. User B uses Evolution+connector to act as a Delegate for User A. So
an account named "User A's delegate" is created in User B's evolution
account list.
3. User A removes User B as his Delegate.
4. User B uses Evolution to view the "Exchange Delegate" tab in
Tools-->Setting. A dialog is popup saying "You are no longer a delegate
for User A, so that account will be removed." Click OK, connector will
crash.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-exchange/ChangeLog,v
retrieving revision 1.1.1.1.2.5
diff -u -r1.1.1.1.2.5 ChangeLog
--- ChangeLog 18 May 2004 15:16:34 -0000 1.1.1.1.2.5
+++ ChangeLog 24 Jun 2004 07:26:39 -0000
@@ -1,3 +1,10 @@
+2004-06-24 Harry Lu <harry lu sun com>
+
+ Fix for a crash.
+
+ * storage/exchange-delegates-delegators.c: (load_delegators): only
+ call remove_account() if the delegator has an account.
+
2004-05-17 Dan Winship <danw novell com>
* configure.in: 1.4.7.2
Index: storage/exchange-delegates-delegators.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/storage/Attic/exchange-delegates-delegators.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 exchange-delegates-delegators.c
--- storage/exchange-delegates-delegators.c 11 May 2004 15:09:04 -0000 1.1.1.1
+++ storage/exchange-delegates-delegators.c 24 Jun 2004 07:26:40 -0000
@@ -308,6 +308,17 @@
delegator->has_account = TRUE;
}
}
+
+ if (!ex_delegators)
+ continue;
+ for (d = 0; d < ex_delegators->len; d++) {
+ delegator = ex_delegators->pdata[d];
+ if (!strcmp (delegator->email, account->id->address)) {
+ delegator->account_name =
+ g_strdup (account->name);
+ delegator->has_account = TRUE;
+ }
+ }
}
g_object_unref (iterator);
@@ -338,7 +349,8 @@
for (i = 0; i < ex_delegators->len; i++) {
delegator = ex_delegators->pdata[i];
- remove_account (control, delegator);
+ if (delegator->has_account)
+ remove_account (control, delegator);
}
for (i = 0; i < ex_delegators->len; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]