Cleaner fix part 1
[bluesky.git] / bluesky / store-multi.c
index f0b1e5e..f6009ba 100644 (file)
@@ -42,8 +42,6 @@ static void multistore_completion_handler(BlueSkyStoreAsync *async,
 {
     g_mutex_lock(top_async->lock);
 
-    g_print("Completed a subrequest for %s\n", async->key);
-
     /* This might be the second request to finish; in that case we don't do
      * anything. */
     if (top_async->status == ASYNC_RUNNING) {
@@ -69,7 +67,6 @@ static void multistore_submit(gpointer store, BlueSkyStoreAsync *async)
 
     switch (async->op) {
     case STORE_OP_GET:
-        g_print("Received multirequest for %s\n", async->key);
         async->status = ASYNC_RUNNING;
         async->exec_time = bluesky_now_hires();
         for (int i = 0; i < 2; i++) {
@@ -107,6 +104,12 @@ static void multistore_submit(gpointer store, BlueSkyStoreAsync *async)
     }
 }
 
+static char *multistore_lookup_last(gpointer store, const char *prefix)
+{
+    BlueSkyStore *base = (BlueSkyStore *)store;
+    return bluesky_store_lookup_last(base, prefix);
+}
+
 static void multistore_cleanup(gpointer store, BlueSkyStoreAsync *async)
 {
 }
@@ -116,6 +119,7 @@ static BlueSkyStoreImplementation store_impl = {
     .destroy = multistore_destroy,
     .submit = multistore_submit,
     .cleanup = multistore_cleanup,
+    .lookup_last = multistore_lookup_last,
 };
 
 void bluesky_store_init_multi(void)