diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/camel-folder-pt-proxy.c | 10 | ||||
-rw-r--r-- | camel/camel-op-queue.h | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/camel/camel-folder-pt-proxy.c b/camel/camel-folder-pt-proxy.c index b87f19382d..e293e07d64 100644 --- a/camel/camel-folder-pt-proxy.c +++ b/camel/camel-folder-pt-proxy.c @@ -192,14 +192,18 @@ _op_exec_or_plan_for_exec (CamelFolderPtProxy *proxy_folder, CamelOp *op) op_queue = proxy_folder->op_queue; - if (op_queue->service_available) { - op_queue->service_available = FALSE; + if (camel_op_queue_get_service_availability (op_queue)) { + camel_op_queue_set_service_availability (op_queue, FALSE); pthread_create (&thread, NULL , (thread_call_func)(op->func), op->param); + camel_op_free (op); + } else { + camel_op_queue_push_op (op_queue, op); } } + /* folder->init_with_store implementation */ typedef struct { @@ -258,7 +262,7 @@ _init_with_store (CamelFolder *folder, CamelStore *parent_store) param->folder = folder; param->parent_store = parent_store; - op->func = async_init_with_store; + op->func = _async_init_with_store; op->param = param; diff --git a/camel/camel-op-queue.h b/camel/camel-op-queue.h index 672413d562..809946867f 100644 --- a/camel/camel-op-queue.h +++ b/camel/camel-op-queue.h @@ -55,7 +55,7 @@ void camel_op_queue_push_op (CamelOpQueue *queue, CamelOp *op); CamelOp *camel_op_queue_pop_op (CamelOpQueue *queue); gboolean camel_op_queue_run_next_op (CamelOpQueue *queue); gboolean camel_op_queue_get_service_availability (CamelOpQueue *queue); -CamelOp *camel_op_new (); +void camel_op_queue_set_service_availability (CamelOpQueue *queue, gboolean available); CamelOp *camel_op_new (); void camel_op_free (CamelOp *op); |