1 |
eva 08/08/06 22:32:04 |
2 |
|
3 |
Added: evolution-exchange-2.22.3-addressbook-crash.patch |
4 |
Log: |
5 |
fix crash in addressbook, bug #233263. |
6 |
(Portage version: 2.2_rc3/cvs/Linux 2.6.26-gentoo-mactel x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 gnome-extra/evolution-exchange/files/evolution-exchange-2.22.3-addressbook-crash.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-extra/evolution-exchange/files/evolution-exchange-2.22.3-addressbook-crash.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-extra/evolution-exchange/files/evolution-exchange-2.22.3-addressbook-crash.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: evolution-exchange-2.22.3-addressbook-crash.patch |
15 |
=================================================================== |
16 |
Index: addressbook/e-book-backend-exchange.c |
17 |
=================================================================== |
18 |
--- addressbook/e-book-backend-exchange.c |
19 |
+++ addressbook/e-book-backend-exchange.c |
20 |
@@ -1766,17 +1766,21 @@ e_book_backend_exchange_build_restrictio |
21 |
r = e_sexp_eval (sexp); |
22 |
if (r && r->type == ESEXP_RES_UNDEFINED) |
23 |
rn = (E2kRestriction *)r->value.string; |
24 |
- else { |
25 |
- g_warning ("conversion to exchange restriction failed"); |
26 |
+ else |
27 |
rn = NULL; |
28 |
- } |
29 |
+ |
30 |
+ if (!rn) |
31 |
+ g_warning ("conversion to exchange restriction failed, query: '%s'", query ? query : "[null]"); |
32 |
|
33 |
e_sexp_result_free (sexp, r); |
34 |
e_sexp_unref (sexp); |
35 |
|
36 |
- if (base_rn) { |
37 |
+ if (base_rn && rn) { |
38 |
e2k_restriction_ref (base_rn); |
39 |
rn = e2k_restriction_andv (rn, base_rn, NULL); |
40 |
+ |
41 |
+ if (!rn) |
42 |
+ g_warning ("failed to concat with a base_rn, query: '%s'", query ? query : "[null]"); |
43 |
} |
44 |
|
45 |
return rn; |
46 |
@@ -1890,9 +1894,14 @@ e_book_backend_exchange_get_contact_list |
47 |
|
48 |
rn = e_book_backend_exchange_build_restriction (query, |
49 |
bepriv->base_rn); |
50 |
+ |
51 |
+ if (!rn) |
52 |
+ return GNOME_Evolution_Addressbook_OtherError; |
53 |
+ |
54 |
iter = e_folder_exchange_search_start (bepriv->folder, NULL, |
55 |
field_names, n_field_names, |
56 |
rn, NULL, TRUE); |
57 |
+ |
58 |
e2k_restriction_unref (rn); |
59 |
|
60 |
*contacts = NULL; |
61 |
@@ -1986,6 +1995,9 @@ e_book_backend_exchange_start_book_view |
62 |
rn = e_book_backend_exchange_build_restriction (query, |
63 |
bepriv->base_rn); |
64 |
|
65 |
+ if (!rn) |
66 |
+ return; |
67 |
+ |
68 |
iter = e_folder_exchange_search_start (bepriv->folder, NULL, |
69 |
field_names, n_field_names, |
70 |
rn, NULL, TRUE); |