aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/pas/pas-backend-ldap.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2001-10-16 07:41:14 +0800
committerChris Toshok <toshok@src.gnome.org>2001-10-16 07:41:14 +0800
commit593a9e898be53559dfcd3e6249ab729805045f75 (patch)
tree53b522ff091bb3ffc8c8b246b8d05426ced2d713 /addressbook/backend/pas/pas-backend-ldap.c
parent31c48795638fe625ac2f19d01cb9791104768424 (diff)
downloadgsoc2013-evolution-593a9e898be53559dfcd3e6249ab729805045f75.tar.gz
gsoc2013-evolution-593a9e898be53559dfcd3e6249ab729805045f75.tar.zst
gsoc2013-evolution-593a9e898be53559dfcd3e6249ab729805045f75.zip
unref the book after we pass it off to evolution-addressbook.
2001-10-15 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_add_client): unref the book after we pass it off to evolution-addressbook. svn path=/trunk/; revision=13691
Diffstat (limited to 'addressbook/backend/pas/pas-backend-ldap.c')
-rw-r--r--addressbook/backend/pas/pas-backend-ldap.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c
index 1a3ab7806b..35f1f54fe2 100644
--- a/addressbook/backend/pas/pas-backend-ldap.c
+++ b/addressbook/backend/pas/pas-backend-ldap.c
@@ -913,6 +913,9 @@ create_card_dtor (PASBackend *backend, LDAPOp *op)
{
LDAPCreateOp *create_op = (LDAPCreateOp*)op;
+ if (op->view)
+ bonobo_object_release_unref(bonobo_object_corba_objref(BONOBO_OBJECT(op->view)), NULL);
+
g_free (create_op->vcard);
g_free (create_op);
}
@@ -929,6 +932,7 @@ pas_backend_ldap_process_create_card (PASBackend *backend,
if (bl->priv->book_views) {
PASBackendLDAPBookView *v = bl->priv->book_views->data;
book_view = v->book_view;
+ bonobo_object_dup_ref(bonobo_object_corba_objref(BONOBO_OBJECT(book_view)), NULL);
}
ldap_op_init ((LDAPOp*)create_op, backend, book,
@@ -1008,6 +1012,9 @@ remove_card_dtor (PASBackend *backend, LDAPOp *op)
{
LDAPRemoveOp *remove_op = (LDAPRemoveOp*)op;
+ if (op->view)
+ bonobo_object_release_unref(bonobo_object_corba_objref(BONOBO_OBJECT(op->view)), NULL);
+
g_free (remove_op->id);
g_free (remove_op);
}
@@ -1024,6 +1031,7 @@ pas_backend_ldap_process_remove_card (PASBackend *backend,
if (bl->priv->book_views) {
PASBackendLDAPBookView *v = bl->priv->book_views->data;
book_view = v->book_view;
+ bonobo_object_dup_ref(bonobo_object_corba_objref(BONOBO_OBJECT(book_view)), NULL);
}
ldap_op_init ((LDAPOp*)remove_op, backend, book,
@@ -1137,6 +1145,9 @@ modify_card_dtor (PASBackend *backend, LDAPOp *op)
{
LDAPModifyOp *modify_op = (LDAPModifyOp*)op;
+ if (op->view)
+ bonobo_object_release_unref(bonobo_object_corba_objref(BONOBO_OBJECT(op->view)), NULL);
+
g_free (modify_op->vcard);
g_free (modify_op);
}
@@ -1153,6 +1164,7 @@ pas_backend_ldap_process_modify_card (PASBackend *backend,
if (bl->priv->book_views) {
PASBackendLDAPBookView *v = bl->priv->book_views->data;
book_view = v->book_view;
+ bonobo_object_dup_ref(bonobo_object_corba_objref(BONOBO_OBJECT(book_view)), NULL);
}
ldap_op_init ((LDAPOp*)modify_op, backend, book,
@@ -2094,6 +2106,9 @@ ldap_search_dtor (PASBackend *backend, LDAPOp *op)
{
LDAPSearchOp *search_op = (LDAPSearchOp*) op;
+ if (op->view)
+ bonobo_object_release_unref(bonobo_object_corba_objref(BONOBO_OBJECT(op->view)), NULL);
+
g_free (search_op->ldap_query);
g_free (search_op);
}
@@ -2105,6 +2120,7 @@ pas_backend_ldap_search (PASBackendLDAP *bl,
{
LDAPSearchOp *op = g_new (LDAPSearchOp, 1);
+ bonobo_object_dup_ref(bonobo_object_corba_objref(BONOBO_OBJECT(view->book_view)), NULL);
ldap_op_init ((LDAPOp*)op, PAS_BACKEND(bl), book, view->book_view, ldap_search_handler, ldap_search_dtor);
op->ldap_query = NULL;
@@ -2387,6 +2403,8 @@ pas_backend_ldap_add_client (PASBackend *backend,
pas_book_report_writable (book, bl->priv->writable);
+ bonobo_object_unref (BONOBO_OBJECT (book));
+
return TRUE;
}