implement, noop currently. Saves an assert exploding the server.
authorNot Zed <NotZed@Ximian.com>
Wed, 16 Jun 2004 06:12:09 +0000 (06:12 +0000)
committerMichael Zucci <zucchi@src.gnome.org>
Wed, 16 Jun 2004 06:12:09 +0000 (06:12 +0000)
2004-06-16  Not Zed  <NotZed@Ximian.com>

        * backends/groupwise/e-book-backend-groupwise.c
        (e_book_backend_groupwise_cancel_operation): implement, noop
        currently.  Saves an assert exploding the server.

        * backends/ldap/e-book-backend-ldap.c
        (e_book_backend_ldap_cancel_operation): implement.
        (ldap_cancel_op): cancel each operation synchronously (?).
        Related to #56479.

addressbook/ChangeLog
addressbook/backends/groupwise/e-book-backend-groupwise.c
addressbook/backends/ldap/e-book-backend-ldap.c

index 8e852f8..b8343d2 100644 (file)
@@ -1,3 +1,14 @@
+2004-06-16  Not Zed  <NotZed@Ximian.com>
+
+       * backends/groupwise/e-book-backend-groupwise.c
+       (e_book_backend_groupwise_cancel_operation): implement, noop
+       currently.  Saves an assert exploding the server.
+
+       * backends/ldap/e-book-backend-ldap.c
+       (e_book_backend_ldap_cancel_operation): implement.
+       (ldap_cancel_op): cancel each operation synchronously (?).
+       Related to #56479.
+
 2004-06-15 Sivaiah Nallagatla <snallagatla@novell.com>
 
        * backends/groupwise/e-book-backend-groupwise.c 
index 8ddd4fa..1b65cb1 100644 (file)
@@ -2056,7 +2056,12 @@ e_book_backend_groupwise_get_supported_fields (EBookBackend *backend,
                                                  fields);
  
 }
-  
+
+static GNOME_Evolution_Addressbook_CallStatus
+e_book_backend_groupwise_cancel_operation (EBookBackend *backend, EDataBook *book)
+{
+       return GNOME_Evolution_Addressbook_CouldNotCancel;
+}
 
 static GNOME_Evolution_Addressbook_CallStatus
 e_book_backend_groupwise_load_source (EBookBackend           *backend,
@@ -2241,6 +2246,7 @@ e_book_backend_groupwise_class_init (EBookBackendGroupwiseClass *klass)
        parent_class->authenticate_user       = e_book_backend_groupwise_authenticate_user;
        parent_class->get_supported_fields    = e_book_backend_groupwise_get_supported_fields;
        parent_class->get_supported_auth_methods = e_book_backend_groupwise_get_supported_auth_methods;
+       parent_class->cancel_operation        = e_book_backend_groupwise_cancel_operation;
        parent_class->remove                  = e_book_backend_groupwise_remove;
        object_class->dispose                 = e_book_backend_groupwise_dispose;
 }
index cfee31d..e7a7620 100644 (file)
@@ -3273,6 +3273,28 @@ e_book_backend_ldap_get_supported_auth_methods (EBookBackend *backend,
                                                     bl->priv->supported_auth_methods);
 }
 
+static void
+ldap_cancel_op(void *key, void *value, void *data)
+{
+       EBookBackendLDAP *bl = data;
+       LDAPOp *op = value;
+
+       /* ignore errors, its only best effort? */
+       ldap_abandon_ext (bl->priv->ldap, op->id, NULL, NULL);
+}
+
+static GNOME_Evolution_Addressbook_CallStatus
+e_book_backend_ldap_cancel_operation (EBookBackend *backend, EDataBook *book)
+{
+       EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
+
+       g_static_rec_mutex_lock (&bl->priv->op_hash_mutex);
+       g_hash_table_foreach (bl->priv->id_to_op, ldap_cancel_op, bl);
+       g_static_rec_mutex_unlock (&bl->priv->op_hash_mutex);
+
+       return GNOME_Evolution_Addressbook_Success;
+}
+
 static GNOME_Evolution_Addressbook_CallStatus
 e_book_backend_ldap_load_source (EBookBackend             *backend,
                                 ESource                  *source,
@@ -3457,6 +3479,7 @@ e_book_backend_ldap_class_init (EBookBackendLDAPClass *klass)
        parent_class->authenticate_user       = e_book_backend_ldap_authenticate_user;
        parent_class->get_supported_fields    = e_book_backend_ldap_get_supported_fields;
        parent_class->get_supported_auth_methods = e_book_backend_ldap_get_supported_auth_methods;
+       parent_class->cancel_operation        = e_book_backend_ldap_cancel_operation;
 
        object_class->dispose = e_book_backend_ldap_dispose;
 }