g_free(async->key);
bluesky_string_unref(async->data);
g_free(async);
+ g_log("bluesky/store", G_LOG_LEVEL_DEBUG,
+ "freeing async");
g_print("Freed async\n");
}
}
/* Barriers are handled specially, and not handed down the storage
* implementation layer. */
- if (async->op = STORE_OP_BARRIER) {
+ if (async->op == STORE_OP_BARRIER) {
async->status = ASYNC_RUNNING;
if (GPOINTER_TO_INT(async->store_private) == 0)
bluesky_store_async_mark_complete(async);
return;
}
+ g_log("bluesky/store", G_LOG_LEVEL_DEBUG, "submit: %s %s",
+ async->op == STORE_OP_GET ? "GET"
+ : async->op == STORE_OP_PUT ? "PUT"
+ : async->op == STORE_OP_DELETE ? "DELETE" : "???",
+ async->key);
+
g_mutex_lock(async->store->lock);
async->store->pending++;
g_mutex_unlock(async->store->lock);
g_return_if_fail(barrier->op == STORE_OP_BARRIER);
barrier->store_private
= GINT_TO_POINTER(GPOINTER_TO_INT(barrier->store_private) + 1);
- bluesky_store_async_add_notifier(async, op_complete, NULL);
+ bluesky_store_async_add_notifier(async, op_complete, barrier);
}
static void notifier_task(gpointer n, gpointer s)