aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/pas
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2001-10-16 07:13:52 +0800
committerChris Toshok <toshok@src.gnome.org>2001-10-16 07:13:52 +0800
commit31c48795638fe625ac2f19d01cb9791104768424 (patch)
tree88f0e7617ed6913b69d52b36ed59465e2364c9b1 /addressbook/backend/pas
parent4bcda57628342b0015417c5cf9c2932e1f8e8f54 (diff)
downloadgsoc2013-evolution-31c48795638fe625ac2f19d01cb9791104768424.tar.gz
gsoc2013-evolution-31c48795638fe625ac2f19d01cb9791104768424.tar.zst
gsoc2013-evolution-31c48795638fe625ac2f19d01cb9791104768424.zip
unref op->view. (pas_backend_ldap_process_create_card): ref op->view.
2001-10-15 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (create_card_dtor): unref op->view. (pas_backend_ldap_process_create_card): ref op->view. (remove_card_dtor): unref op->view. (pas_backend_ldap_process_remove_card): ref op->view. (modify_card_dtor): unref op->view. (pas_backend_ldap_process_modify_card): ref op->view. (ldap_search_dtor): unref op->view. (pas_backend_ldap_search): ref op->view. svn path=/trunk/; revision=13690
Diffstat (limited to 'addressbook/backend/pas')
-rw-r--r--addressbook/backend/pas/pas-backend-file.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
index 56c6485e7f..08698a74ca 100644
--- a/addressbook/backend/pas/pas-backend-file.c
+++ b/addressbook/backend/pas/pas-backend-file.c
@@ -508,6 +508,7 @@ do_create(PASBackend *backend,
}
else {
+ g_free (id);
ret_val = NULL;
}
@@ -575,8 +576,20 @@ pas_backend_file_process_remove_card (PASBackend *backend,
int db_error;
EIterator *iterator;
char *vcard_string;
+ const char *id;
- string_to_dbt (req->id, &id_dbt);
+ /* This is disgusting, but for a time cards were added with
+ ID's that are no longer used (they contained both the uri
+ and the id.) If we recognize it as a uri (file:///...) trim
+ off everything before the last '/', and use that as the
+ id.*/
+ if (!strncmp (req->id, "file:///", strlen ("file:///"))) {
+ id = strrchr (req->id, '/') + 1;
+ }
+ else
+ id = req->id;
+
+ string_to_dbt (id, &id_dbt);
memset (&vcard_dbt, 0, sizeof (vcard_dbt));
db_error = db->get (db, NULL, &id_dbt, &vcard_dbt, 0);
@@ -632,14 +645,25 @@ pas_backend_file_process_modify_card (PASBackend *backend,
int db_error;
EIterator *iterator;
ECard *card;
- const char *id;
+ const char *id, *lookup_id;
char *old_vcard_string;
/* create a new ecard from the request data */
card = e_card_new(req->vcard);
id = e_card_get_id(card);
- string_to_dbt (id, &id_dbt);
+ /* This is disgusting, but for a time cards were added with
+ ID's that are no longer used (they contained both the uri
+ and the id.) If we recognize it as a uri (file:///...) trim
+ off everything before the last '/', and use that as the
+ id.*/
+ if (!strncmp (id, "file:///", strlen ("file:///"))) {
+ lookup_id = strrchr (id, '/') + 1;
+ }
+ else
+ lookup_id = id;
+
+ string_to_dbt (lookup_id, &id_dbt);
memset (&vcard_dbt, 0, sizeof (vcard_dbt));
/* get the old ecard - the one that's presently in the db */
f290e91793ad7fbf8ca'>- Remove MAKE_JOBS_SAFE variableak2013-08-151-1/+0 * - Cleanup Makefilesunpoet2013-05-091-5/+2 * - Convert USE_GETTEXT to USES (part 4)ak2013-04-261-1/+1 * Finish converting the whole ports tree to USES=pkgconfigbapt2013-04-231-8/+2 * This changes almost all the "gnomehack" only USE_GNOME cases to USES= pathfix.eadler2013-03-191-1/+1 * new devel/pkgconf added to replace devel/pkg-config. new version of pkg-configbapt2012-07-261-1/+1 * For ports maintained by ports@ where pkgconfig is one of the USE_GNOME depsdougb2012-07-231-1/+2 * - Update MASTER_SITESsylvio2012-06-062-6/+11 * - Add LDFLAGS to CONFIGURE_ENV and MAKE_ENV (as it was done with LDFLAGS)amdmi32011-09-241-2/+2 * Remove USE_GNOME=gnometarget from ports. It has been a empty keyword sincekwm2011-08-121-1/+1 * - Get Rid MD5 supportmiwi2011-03-191-1/+0 * Sync to new bsd.autotools.mkade2010-12-041-1/+1 * Bounce PORTREVISION for gettext-related ports. Have fun, ya'll.ade2010-05-311-1/+1 * - Fix build on 9.0amdmi32009-11-041-3/+12 * - Switch SourceForge ports to the new File Release System: categories startin...amdmi32009-08-221-2/+1 * -Repocopy devel/libtool15 -> libtool22 and libltdl15 -> libltdl22.mezz2009-08-033-34/+2 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-061-2/+1 * Use libtool port instead of included one to avoid objformat a.out botchkris2007-01-281-1/+1 * - s,INSTALLS_SHLIB,USE_LDCONFIG,gclsung2006-08-141-1/+1 * Conversion to a single libtool environment.ade2006-02-232-2/+19 * BROKEN with WITHOUT_NLS: Does not build without gettextkris2006-01-241-0/+1 * - Add SHA256pav2005-11-241-0/+1 * Mass-conversion to the USE_AUTOTOOLS New World Order. The code presentade2005-11-151-2/+1 * Remove explicit checks for /usr/bin/bzip2.edwin2005-11-141-4/+0 * change the libtool version to use from 1.3 to 1.5oliver2005-05-312-9/+1 * Fix build with gcc 3.4arved2004-08-161-0/+11 * libcurl no longer provides formparse() -> disable curl-support.vs2004-06-232-7/+5 * BROKEN: Broken pkg-plistkris2004-06-151-0/+2 * Re-bump the curl shared library version.kris2004-06-071-1/+1 * Sync with new bsd.autotools.mkade2004-06-051-2/+3 * Update ftp/curl to 7.12.0 and bump the shared library version in allroam2004-06-041-2/+2 * Support WITHOUT_NLSkris2004-03-252-3/+10 * Whoa there, boy, that's a mighty big commit y'all have there...ade2004-03-141-1/+1 * Add USE_GETTEXT and bump PORTREVISION.marcus2004-02-041-3/+3 * Add SIZE.trevor2004-01-281-0/+1 * Now gettext 0.12.1 is gettext-old.trevor2004-01-241-1/+1 * - Add *.la files for loadable module supportkrion2003-10-294-15/+20 * - Update to version 0.3.3krion2003-10-299-26/+104 * portlint (switch back to USE_LIBTOOL). I'm not sure why this waskris2003-10-272-8/+1 * portlint (fix whitespace)kris2003-10-271-1/+1 * Bump the PORTREVISION for the ports directly affected by the gettext upgrade.marcus2003-08-271-1/+1 * Chase the libintl.so shared lib version.marcus2003-08-251-1/+1 * libtool uber-patchade2003-06-271-3/+6 * De-pkg-comment.knu2003-02-212-1/+1 * Update to 0.3.2.nork2003-02-025-46/+162 * o Rollback PORTCOMMENT modifications while this feature's implementationlioux2002-11-112-2/+1 * Use PORTCOMMENT in the Makefile, and whack the pkg-comment.adamw2002-11-072-1/+2 * upgrade 0.3.1ijliao2002-05-313-14/+43 * upgrade to 0.3.0ijliao2002-05-123-11/+31 * Fix plistpat2001-12-181-1/+1 * - Conditionalize bzip2 dependenciesijliao2001-11-242-6/+8