de-experimentalizing
[oweals/gnunet.git] / src / datastore / plugin_datastore_mysql.c
index 84f9d313ca34747132eb226d73ade0f8d5eb45ca..1658aa51a2f1e037acf7f630cfffcd7c8ff1b7a9 100644 (file)
@@ -657,7 +657,7 @@ init_params (struct Plugin *plugin,
     }
   if (! ( (pc == 0) && (-1 != (int) ft) && (va_arg (ap, int) == -1) ) )
     {
-      GNUNET_break (0);
+      GNUNET_assert (0);
       return GNUNET_SYSERR;
     }
   if (mysql_stmt_bind_param (s->statement, qbind))
@@ -946,7 +946,7 @@ mysql_next_request_cont (void *next_cls,
              exp);
 #endif
   expiration.abs_value = exp;
-  ret = nrc->dviter (nrc->dviter_cls, nrc,
+  ret = nrc->dviter (nrc->dviter_cls, (nrc->end_it == GNUNET_YES) ? NULL : nrc,
                     &key,
                     size, value,
                     type, priority, anonymity, expiration,
@@ -1465,14 +1465,12 @@ replication_prepare (void *cls,
                     struct NextRequestClosure *nrc)
 {
   struct Plugin *plugin = cls;
-  unsigned long long nt;
 
-  nt = (unsigned long long) nrc->now.abs_value;
+  nrc->end_it = GNUNET_YES;
   return prepared_statement_run_select (plugin,
                                        plugin->select_replication, 
-                                       6, nrc->rbind, 
+                                       7, nrc->rbind, 
                                        &return_ok, NULL,
-                                       MYSQL_TYPE_LONGLONG, &nt, GNUNET_YES, 
                                        -1);
 }
 
@@ -1524,6 +1522,7 @@ expiration_prepare (void *cls,
 
   if (NULL == nrc)
     return GNUNET_NO;
+  nrc->end_it = GNUNET_YES;
   nt = (long long) nrc->now.abs_value;
   return prepared_statement_run_select
     (plugin,