aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/pas
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-05-02 04:44:00 +0800
committerChris Lahey <clahey@src.gnome.org>2000-05-02 04:44:00 +0800
commitedb8c5850a180be4d015a90da44cf2581fb27ba9 (patch)
tree98f7615cf7be9a6b5770a371e8fe4e7a97c2b821 /addressbook/backend/pas
parentba2128204f596f12092f6a0ef9da4e51a5dafde5 (diff)
downloadgsoc2013-evolution-edb8c5850a180be4d015a90da44cf2581fb27ba9.tar.gz
gsoc2013-evolution-edb8c5850a180be4d015a90da44cf2581fb27ba9.tar.zst
gsoc2013-evolution-edb8c5850a180be4d015a90da44cf2581fb27ba9.zip
Made uri slightly better managed.
2000-05-01 Christopher James Lahey <clahey@helixcode.com> * backend/pas/pas-backend-file.c, backend/pas/pas-backend-ldap.c: Made uri slightly better managed. * backend/pas/pas-book-factory.c (pas_book_factory_process_request): Remove this CORBA_Object_release that causes things not to work. This is just a temporary fix until we figure out what's actually wrong. * backend/pas/pas-book.c: Fixed a copy and paste error in a warning. svn path=/trunk/; revision=2718
Diffstat (limited to 'addressbook/backend/pas')
-rw-r--r--addressbook/backend/pas/pas-backend-file.c9
-rw-r--r--addressbook/backend/pas/pas-backend-ldap.c13
-rw-r--r--addressbook/backend/pas/pas-book-factory.c3
-rw-r--r--addressbook/backend/pas/pas-book.c2
4 files changed, 13 insertions, 14 deletions
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
index e2ca9a7348..11b5abb670 100644
--- a/addressbook/backend/pas/pas-backend-file.c
+++ b/addressbook/backend/pas/pas-backend-file.c
@@ -944,7 +944,8 @@ pas_backend_file_load_uri (PASBackend *backend,
if (pas_backend_file_maybe_upgrade_db (bf))
bf->priv->loaded = TRUE;
/* XXX what if we fail to upgrade it? */
-
+
+ g_free(bf->priv->uri);
bf->priv->uri = g_strdup (uri);
} else {
GList *l;
@@ -1096,10 +1097,7 @@ pas_backend_file_destroy (GtkObject *object)
bf = PAS_BACKEND_FILE (object);
- if (bf->priv->uri) {
- g_free (bf->priv->uri);
- bf->priv->uri = NULL;
- }
+ g_free (bf->priv->uri);
GTK_OBJECT_CLASS (pas_backend_file_parent_class)->destroy (object);
}
@@ -1132,6 +1130,7 @@ pas_backend_file_init (PASBackendFile *backend)
priv->loaded = FALSE;
priv->clients = NULL;
priv->book_views = NULL;
+ priv->uri = NULL;
backend->priv = priv;
}
diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c
index 041d7cea4f..e40f6cb922 100644
--- a/addressbook/backend/pas/pas-backend-ldap.c
+++ b/addressbook/backend/pas/pas-backend-ldap.c
@@ -885,6 +885,7 @@ pas_backend_ldap_load_uri (PASBackend *backend,
ldap_error = ldap_url_parse ((char*)uri, &lud);
if (ldap_error == LDAP_SUCCESS) {
+ g_free(bl->priv->uri);
bl->priv->uri = g_strdup (uri);
bl->priv->ldap_host = g_strdup(lud->lud_host);
bl->priv->ldap_port = lud->lud_port;
@@ -1040,10 +1041,7 @@ pas_backend_ldap_destroy (GtkObject *object)
bl = PAS_BACKEND_LDAP (object);
- if (bl->priv->uri) {
- g_free (bl->priv->uri);
- bl->priv->uri = NULL;
- }
+ g_free (bl->priv->uri);
GTK_OBJECT_CLASS (pas_backend_ldap_parent_class)->destroy (object);
}
@@ -1072,9 +1070,10 @@ pas_backend_ldap_init (PASBackendLDAP *backend)
{
PASBackendLDAPPrivate *priv;
- priv = g_new0 (PASBackendLDAPPrivate, 1);
- priv->connected = FALSE;
- priv->clients = NULL;
+ priv = g_new0 (PASBackendLDAPPrivate, 1);
+ priv->connected = FALSE;
+ priv->clients = NULL;
+ priv->uri = NULL;
backend->priv = priv;
}
diff --git a/addressbook/backend/pas/pas-book-factory.c b/addressbook/backend/pas/pas-book-factory.c
index cd7a8d3ed9..78b031233a 100644
--- a/addressbook/backend/pas/pas-book-factory.c
+++ b/addressbook/backend/pas/pas-book-factory.c
@@ -269,7 +269,7 @@ pas_book_factory_process_request (PASBookFactory *factory,
out:
g_free (uri);
-
+#if 0
CORBA_exception_init (&ev);
CORBA_Object_release (listener, &ev);
@@ -277,6 +277,7 @@ pas_book_factory_process_request (PASBookFactory *factory,
g_message ("pas_book_factory_process_request(): could not release the listener");
CORBA_exception_free (&ev);
+#endif
}
static gboolean
diff --git a/addressbook/backend/pas/pas-book.c b/addressbook/backend/pas/pas-book.c
index 8aea0197cc..d6e9ff55ac 100644
--- a/addressbook/backend/pas/pas-book.c
+++ b/addressbook/backend/pas/pas-book.c
@@ -419,7 +419,7 @@ pas_book_respond_get_book_view (PASBook *book,
book->priv->listener, status, object, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("pas_book_respond_get_cursor: Exception "
+ g_warning ("pas_book_respond_get_book_view: Exception "
"responding to BookListener!\n");
}