]> code.ossystems Code Review - openembedded-core.git/commitdiff
Fix adding new contact failure when starting contacts for the 1st time
authorZhai Edwin <edwin.zhai@intel.com>
Fri, 22 Oct 2010 09:11:26 +0000 (17:11 +0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 22 Oct 2010 16:00:25 +0000 (17:00 +0100)
When contacts called for the 1st time, adding new contact always failed but
worked after restart. The reason is e-addressbook-factory used to handle
addressbook leads a segmentation fault. Root cause is that factory would
create the data base if not exist, but use it without proper
initialization.

[BUGID #455] got fixed by this.

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
meta/recipes-sato/eds/eds-dbus/new-contact-fix.patch [new file with mode: 0644]
meta/recipes-sato/eds/eds-dbus_git.bb

diff --git a/meta/recipes-sato/eds/eds-dbus/new-contact-fix.patch b/meta/recipes-sato/eds/eds-dbus/new-contact-fix.patch
new file mode 100644 (file)
index 0000000..d34cc55
--- /dev/null
@@ -0,0 +1,21 @@
+When contacts called for the 1st time, adding new contact always failed but
+worked after restart. The reason is e-addressbook-factory used to handle
+addressbook leads a segmentation fault. Root cause is that factory would create
+the data base if not exist, but use it without proper initialization.
+
+This patch fix it.
+
+Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
+Index: git/addressbook/backends/file/e-book-backend-file.c
+===================================================================
+--- git.orig/addressbook/backends/file/e-book-backend-file.c   2010-10-20 16:14:31.000000000 +0800
++++ git/addressbook/backends/file/e-book-backend-file.c        2010-10-22 14:11:47.000000000 +0800
+@@ -1217,6 +1217,8 @@
+                               EContact *contact = NULL;
+                               EBookBackendSyncStatus status;
++                              /* Initialize file_db, or else following do_create cause seg fault */
++                              bf->priv->file_db = db;
+                               status = do_create (bf, XIMIAN_VCARD, &contact);
+                               if (status != GNOME_Evolution_Addressbook_Success)
+                                       g_warning ("Cannot create default contact: %d", status);
index e11c91d5d7db7a9a3b799dc3589b94d22260b6ab..e5b7e15f71940431dab207ad35cff071496258c2 100644 (file)
@@ -11,12 +11,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6a6e689d19255cf0557f3fe7d7068212 \
 DEPENDS = "intltool-native glib-2.0 gtk+ gconf dbus db gnome-common virtual/libiconv zlib libsoup-2.4 libglade libical gnome-keyring gperf-native"
 
 PV = "2.30+git${SRCPV}"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "git://git.gnome.org/evolution-data-server;protocol=git \
            file://oh-contact.patch;patch=1;pnum=0 \
            file://nossl.patch;patch=1 \
            file://optional_imapx_provider.patch;patch=1 \
+           file://new-contact-fix.patch;patch=1 \
            file://iconv-detect.h"
 
 S = "${WORKDIR}/git"