2001-07-24 Not Zed <NotZed@Ximian.com>
* camel-operation.c (camel_operation_register, unregister): Added
some warnings for bad cases.
2001-07-23 Not Zed <NotZed@Ximian.com>
* camel-operation.c (camel_operation_register): Only insert a hash
entry if we haven't already.
(camel_operation_unregister): Only remove the has entry if the id
is a real thread.
+2001-07-24 Not Zed <NotZed@Ximian.com>
+
+ * camel-operation.c (camel_operation_register, unregister): Added
+ some warnings for bad cases.
+
+2001-07-23 Not Zed <NotZed@Ximian.com>
+
+ * camel-operation.c (camel_operation_register): Only insert a hash
+ entry if we haven't already.
+ (camel_operation_unregister): Only remove the has entry if the id
+ is a real thread.
+
2001-07-23 Jeffrey Stedfast <fejj@ximian.com>
* camel-filter-driver.c (do_move): Slight fix for when source ==
}
}
- cc->id = id;
- g_hash_table_insert(operation_active, (void *)id, cc);
+ if (cc->id == (~0)) {
+ cc->id = id;
+ g_hash_table_insert(operation_active, (void *)id, cc);
+ } else {
+ g_warning("Re-registering thread %d for cancellation as thread %d", cc->id, id);
+ }
d(printf("registering thread %ld for cancellation\n", id));
}
}
- if (cc)
- g_hash_table_remove(operation_active, (void *)cc->id);
+ if (cc) {
+ if (cc->id != (~0)) {
+ g_hash_table_remove(operation_active, (void *)cc->id);
+ cc->id == ~0;
+ } else {
+ g_warning("Unregistering an operation that was already unregistered");
+ }
+ }
CAMEL_ACTIVE_UNLOCK();