[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r8737 - gnunet/src/datastore
From: |
gnunet |
Subject: |
[GNUnet-SVN] r8737 - gnunet/src/datastore |
Date: |
Fri, 17 Jul 2009 14:08:15 -0600 |
Author: grothoff
Date: 2009-07-17 14:08:15 -0600 (Fri, 17 Jul 2009)
New Revision: 8737
Modified:
gnunet/src/datastore/perf_plugin_datastore.c
gnunet/src/datastore/plugin_datastore_sqlite.c
Log:
fixes
Modified: gnunet/src/datastore/perf_plugin_datastore.c
===================================================================
--- gnunet/src/datastore/perf_plugin_datastore.c 2009-07-17 19:58:07 UTC
(rev 8736)
+++ gnunet/src/datastore/perf_plugin_datastore.c 2009-07-17 20:08:15 UTC
(rev 8737)
@@ -67,7 +67,7 @@
struct CpsRunContext
{
- int i;
+ unsigned int i;
struct GNUNET_TIME_Absolute start;
struct GNUNET_TIME_Absolute end;
struct GNUNET_SCHEDULER_Handle *sched;
@@ -126,7 +126,11 @@
stored_entries++;
}
+static void
+test (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
+
static int
iterateDummy (void *cls,
void *next_cls,
@@ -146,6 +150,7 @@
{
crc->end = GNUNET_TIME_absolute_get();
printf (crc->msg,
+ crc->i,
(unsigned long long) (crc->end.value - crc->start.value));
if (crc->phase != RP_AN_GET)
{
@@ -158,6 +163,11 @@
else
crc->phase = RP_PUT;
}
+ GNUNET_SCHEDULER_add_after (crc->sched,
+ GNUNET_NO,
+ GNUNET_SCHEDULER_PRIORITY_KEEP,
+ GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ &test, crc);
return GNUNET_OK;
}
crc->api->next_request (next_cls,
@@ -165,6 +175,7 @@
return GNUNET_OK;
}
+
static void
test (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
Modified: gnunet/src/datastore/plugin_datastore_sqlite.c
===================================================================
--- gnunet/src/datastore/plugin_datastore_sqlite.c 2009-07-17 19:58:07 UTC
(rev 8736)
+++ gnunet/src/datastore/plugin_datastore_sqlite.c 2009-07-17 20:08:15 UTC
(rev 8737)
@@ -519,7 +519,7 @@
{
static struct GNUNET_TIME_Absolute zero;
struct NextContext * nc= next_cls;
- struct Plugin *plugin = nc->plugin;
+ struct Plugin *plugin;
unsigned long long rowid;
sqlite3_stmt *stmtd;
int ret;
@@ -531,6 +531,7 @@
const GNUNET_HashCode *key;
const void *data;
+ plugin = nc->plugin;
sqlite3_reset (nc->stmt);
if ( (GNUNET_YES == end_it) ||
(GNUNET_YES == nc->end_it) ||
@@ -784,7 +785,7 @@
struct NextContext *nc)
{
struct IterContext *ic = cls;
- struct Plugin *plugin = nc->plugin;
+ struct Plugin *plugin;
int ret;
if (nc == NULL)
@@ -793,6 +794,7 @@
sqlite3_finalize (ic->stmt_2);
return GNUNET_SYSERR;
}
+ plugin = nc->plugin;
if (ic->is_prio)
{
sqlite3_bind_int (ic->stmt_1, 1, nc->lastPriority);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r8737 - gnunet/src/datastore,
gnunet <=