Minor cleanup.
[bluesky.git] / bluesky / file.c
index ccb45e4..f9f6444 100644 (file)
@@ -194,7 +194,16 @@ void bluesky_block_flush(BlueSkyFS *fs, BlueSkyBlock *block)
     g_checksum_update(csum, data->data, data->len);
     gchar *name = g_strdup(g_checksum_get_string(csum));
 
-    bluesky_store_put(fs->store, name, data);
+    /* Store the file data asynchronously, and don't bother waiting for a
+     * response. */
+    BlueSkyStoreAsync *async = bluesky_store_async_new(fs->store);
+    async->op = STORE_OP_PUT;
+    async->key = g_strdup(name);
+    bluesky_string_ref(data);
+    async->data = data;
+    bluesky_store_async_submit(async);
+    bluesky_store_async_unref(async);
+
     g_free(block->ref);
     block->ref = name;