aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-10-27 09:39:41 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-10-27 09:39:41 +0000
commit6cccd878eeab34115d87b75fa018582422f04dd4 (patch)
treef24e01777b791d101225c999dd95cb2820612aa5 /src
parent5be02c06ab32edcc8ab3ea6b8ff291ba946ed831 (diff)
downloadgnunet-6cccd878eeab34115d87b75fa018582422f04dd4.tar.gz
gnunet-6cccd878eeab34115d87b75fa018582422f04dd4.zip
Refactoring gnunet time
Diffstat (limited to 'src')
-rw-r--r--src/datastore/datastore_api.c16
-rw-r--r--src/datastore/gnunet-service-datastore.c6
-rw-r--r--src/datastore/perf_datastore_api.c2
-rw-r--r--src/datastore/perf_plugin_datastore.c8
-rw-r--r--src/datastore/plugin_datastore_mysql.c10
-rw-r--r--src/datastore/plugin_datastore_postgres.c4
-rw-r--r--src/datastore/plugin_datastore_sqlite.c32
-rw-r--r--src/datastore/test_datastore_api.c4
-rw-r--r--src/datastore/test_datastore_api_management.c4
9 files changed, 43 insertions, 43 deletions
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c
index 3c34ee8e9..4172b5c99 100644
--- a/src/datastore/datastore_api.c
+++ b/src/datastore/datastore_api.c
@@ -500,11 +500,11 @@ try_reconnect (void *cls,
500{ 500{
501 struct GNUNET_DATASTORE_Handle *h = cls; 501 struct GNUNET_DATASTORE_Handle *h = cls;
502 502
503 if (h->retry_time.value < GNUNET_CONSTANTS_SERVICE_RETRY.value) 503 if (h->retry_time.rel_value < GNUNET_CONSTANTS_SERVICE_RETRY.rel_value)
504 h->retry_time = GNUNET_CONSTANTS_SERVICE_RETRY; 504 h->retry_time = GNUNET_CONSTANTS_SERVICE_RETRY;
505 else 505 else
506 h->retry_time = GNUNET_TIME_relative_multiply (h->retry_time, 2); 506 h->retry_time = GNUNET_TIME_relative_multiply (h->retry_time, 2);
507 if (h->retry_time.value > GNUNET_CONSTANTS_SERVICE_TIMEOUT.value) 507 if (h->retry_time.rel_value > GNUNET_CONSTANTS_SERVICE_TIMEOUT.rel_value)
508 h->retry_time = GNUNET_CONSTANTS_SERVICE_TIMEOUT; 508 h->retry_time = GNUNET_CONSTANTS_SERVICE_TIMEOUT;
509 h->reconnect_task = GNUNET_SCHEDULER_NO_TASK; 509 h->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
510 h->client = GNUNET_CLIENT_connect (h->sched, "datastore", h->cfg); 510 h->client = GNUNET_CLIENT_connect (h->sched, "datastore", h->cfg);
@@ -784,7 +784,7 @@ process_status_message (void *cls,
784 gettext_noop ("# status messages received"), 784 gettext_noop ("# status messages received"),
785 1, 785 1,
786 GNUNET_NO); 786 GNUNET_NO);
787 h->retry_time.value = 0; 787 h->retry_time.rel_value = 0;
788 process_queue (h); 788 process_queue (h);
789 if (rc.cont != NULL) 789 if (rc.cont != NULL)
790 rc.cont (rc.cont_cls, 790 rc.cont (rc.cont_cls,
@@ -1055,7 +1055,7 @@ GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h,
1055 "Asked to update entry %llu raising priority by %u and expiration to %llu\n", 1055 "Asked to update entry %llu raising priority by %u and expiration to %llu\n",
1056 uid, 1056 uid,
1057 (unsigned int) priority, 1057 (unsigned int) priority,
1058 (unsigned long long) expiration.value); 1058 (unsigned long long) expiration.abs_value);
1059#endif 1059#endif
1060 qc.sc.cont = cont; 1060 qc.sc.cont = cont;
1061 qc.sc.cont_cls = cont_cls; 1061 qc.sc.cont_cls = cont_cls;
@@ -1221,7 +1221,7 @@ process_result_message (void *cls,
1221 rc.iter (rc.iter_cls, 1221 rc.iter (rc.iter_cls,
1222 NULL, 0, NULL, 0, 0, 0, 1222 NULL, 0, NULL, 0, 0, 0,
1223 GNUNET_TIME_UNIT_ZERO_ABS, 0); 1223 GNUNET_TIME_UNIT_ZERO_ABS, 0);
1224 h->retry_time.value = 0; 1224 h->retry_time.rel_value = 0;
1225 h->result_count = 0; 1225 h->result_count = 0;
1226 process_queue (h); 1226 process_queue (h);
1227 return; 1227 return;
@@ -1274,7 +1274,7 @@ process_result_message (void *cls,
1274 ntohl(dm->size), 1274 ntohl(dm->size),
1275 GNUNET_h2s(&dm->key)); 1275 GNUNET_h2s(&dm->key));
1276#endif 1276#endif
1277 h->retry_time.value = 0; 1277 h->retry_time.rel_value = 0;
1278 rc.iter (rc.iter_cls, 1278 rc.iter (rc.iter_cls,
1279 &dm->key, 1279 &dm->key,
1280 ntohl(dm->size), 1280 ntohl(dm->size),
@@ -1318,7 +1318,7 @@ GNUNET_DATASTORE_get_random (struct GNUNET_DATASTORE_Handle *h,
1318#if DEBUG_DATASTORE 1318#if DEBUG_DATASTORE
1319 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1319 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1320 "Asked to get random entry in %llu ms\n", 1320 "Asked to get random entry in %llu ms\n",
1321 (unsigned long long) timeout.value); 1321 (unsigned long long) timeout.abs_value);
1322#endif 1322#endif
1323 qc.rc.iter = iter; 1323 qc.rc.iter = iter;
1324 qc.rc.iter_cls = iter_cls; 1324 qc.rc.iter_cls = iter_cls;
@@ -1378,7 +1378,7 @@ GNUNET_DATASTORE_get_zero_anonymity (struct GNUNET_DATASTORE_Handle *h,
1378#if DEBUG_DATASTORE 1378#if DEBUG_DATASTORE
1379 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1379 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1380 "Asked to get zero-anonymity entry in %llu ms\n", 1380 "Asked to get zero-anonymity entry in %llu ms\n",
1381 (unsigned long long) timeout.value); 1381 (unsigned long long) timeout.abs_value);
1382#endif 1382#endif
1383 qc.rc.iter = iter; 1383 qc.rc.iter = iter;
1384 qc.rc.iter_cls = iter_cls; 1384 qc.rc.iter_cls = iter_cls;
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c
index 6455ecb5b..6c064743e 100644
--- a/src/datastore/gnunet-service-datastore.c
+++ b/src/datastore/gnunet-service-datastore.c
@@ -350,7 +350,7 @@ expired_processor (void *cls,
350 return GNUNET_SYSERR; 350 return GNUNET_SYSERR;
351 } 351 }
352 now = GNUNET_TIME_absolute_get (); 352 now = GNUNET_TIME_absolute_get ();
353 if (expiration.value > now.value) 353 if (expiration.abs_value > now.abs_value)
354 { 354 {
355 /* finished processing */ 355 /* finished processing */
356 plugin->api->next_request (next_cls, GNUNET_YES); 356 plugin->api->next_request (next_cls, GNUNET_YES);
@@ -362,7 +362,7 @@ expired_processor (void *cls,
362 "Deleting content `%s' of type %u that expired %llu ms ago\n", 362 "Deleting content `%s' of type %u that expired %llu ms ago\n",
363 GNUNET_h2s (key), 363 GNUNET_h2s (key),
364 type, 364 type,
365 (unsigned long long) (now.value - expiration.value)); 365 (unsigned long long) (now.abs_value - expiration.abs_value));
366#endif 366#endif
367 GNUNET_STATISTICS_update (stats, 367 GNUNET_STATISTICS_update (stats,
368 gettext_noop ("# bytes expired"), 368 gettext_noop ("# bytes expired"),
@@ -1486,7 +1486,7 @@ process_stat_in (void *cls,
1486#if DEBUG_SQLITE 1486#if DEBUG_SQLITE
1487 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1487 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1488 "Notification from statistics about existing payload (%llu), new payload is %llu\n", 1488 "Notification from statistics about existing payload (%llu), new payload is %llu\n",
1489 value, 1489 abs_value,
1490 payload); 1490 payload);
1491#endif 1491#endif
1492 return GNUNET_OK; 1492 return GNUNET_OK;
diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c
index 3cb730bcb..bb4f88cf3 100644
--- a/src/datastore/perf_datastore_api.c
+++ b/src/datastore/perf_datastore_api.c
@@ -295,7 +295,7 @@ run_continuation (void *cls,
295 "Stored %llu kB / %lluk ops / %llu ops/s\n", 295 "Stored %llu kB / %lluk ops / %llu ops/s\n",
296 stored_bytes / 1024, /* used size in k */ 296 stored_bytes / 1024, /* used size in k */
297 stored_ops / 1024, /* total operations (in k) */ 297 stored_ops / 1024, /* total operations (in k) */
298 1000 * stored_ops / (1 + GNUNET_TIME_absolute_get_duration(start_time).value)); 298 1000 * stored_ops / (1 + GNUNET_TIME_absolute_get_duration(start_time).rel_value));
299 crc->phase = RP_PUT; 299 crc->phase = RP_PUT;
300 crc->j = 0; 300 crc->j = 0;
301 GNUNET_SCHEDULER_add_continuation (crc->sched, 301 GNUNET_SCHEDULER_add_continuation (crc->sched,
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c
index 4d39d85ac..d870c0da3 100644
--- a/src/datastore/perf_plugin_datastore.c
+++ b/src/datastore/perf_plugin_datastore.c
@@ -114,7 +114,7 @@ putValue (struct GNUNET_DATASTORE_PluginFunctions * api, int i, int k)
114 size = size - (size & 7); /* always multiple of 8 */ 114 size = size - (size & 7); /* always multiple of 8 */
115 115
116 /* generate random key */ 116 /* generate random key */
117 key.bits[0] = (unsigned int) GNUNET_TIME_absolute_get ().value; 117 key.bits[0] = (unsigned int) GNUNET_TIME_absolute_get ().abs_value;
118 GNUNET_CRYPTO_hash (&key, sizeof (GNUNET_HashCode), &key); 118 GNUNET_CRYPTO_hash (&key, sizeof (GNUNET_HashCode), &key);
119 memset (value, i, size); 119 memset (value, i, size);
120 if (i > 255) 120 if (i > 255)
@@ -170,7 +170,7 @@ iterateDummy (void *cls,
170 crc->end = GNUNET_TIME_absolute_get(); 170 crc->end = GNUNET_TIME_absolute_get();
171 printf (crc->msg, 171 printf (crc->msg,
172 crc->i, 172 crc->i,
173 (unsigned long long) (crc->end.value - crc->start.value), 173 (unsigned long long) (crc->end.abs_value - crc->start.abs_value),
174 crc->cnt); 174 crc->cnt);
175 if (crc->phase != RP_AN_GET) 175 if (crc->phase != RP_AN_GET)
176 { 176 {
@@ -191,7 +191,7 @@ iterateDummy (void *cls,
191#if VERBOSE 191#if VERBOSE
192 fprintf (stderr, "Found result type=%u, priority=%u, size=%u, expire=%llu\n", 192 fprintf (stderr, "Found result type=%u, priority=%u, size=%u, expire=%llu\n",
193 type, priority, size, 193 type, priority, size,
194 (unsigned long long) expiration.value); 194 (unsigned long long) expiration.abs_value);
195#endif 195#endif
196 crc->cnt++; 196 crc->cnt++;
197 crc->api->next_request (next_cls, 197 crc->api->next_request (next_cls,
@@ -263,7 +263,7 @@ test (void *cls,
263 crc->end = GNUNET_TIME_absolute_get (); 263 crc->end = GNUNET_TIME_absolute_get ();
264 printf ("%3u insertion took %20llums for %u\n", 264 printf ("%3u insertion took %20llums for %u\n",
265 crc->i, 265 crc->i,
266 (unsigned long long) (crc->end.value - crc->start.value), 266 (unsigned long long) (crc->end.abs_value - crc->start.abs_value),
267 (unsigned int) PUT_10); 267 (unsigned int) PUT_10);
268 crc->i++; 268 crc->i++;
269 crc->phase = RP_LP_GET; 269 crc->phase = RP_LP_GET;
diff --git a/src/datastore/plugin_datastore_mysql.c b/src/datastore/plugin_datastore_mysql.c
index 150dc665c..0aefbb75d 100644
--- a/src/datastore/plugin_datastore_mysql.c
+++ b/src/datastore/plugin_datastore_mysql.c
@@ -1062,7 +1062,7 @@ iterator_helper_prepare (void *cls,
1062 &nrc->last_vkey, 1062 &nrc->last_vkey,
1063 GNUNET_YES, 1063 GNUNET_YES,
1064 MYSQL_TYPE_LONGLONG, 1064 MYSQL_TYPE_LONGLONG,
1065 &nrc->now.value, 1065 &nrc->now.abs_value,
1066 GNUNET_YES, 1066 GNUNET_YES,
1067 MYSQL_TYPE_LONGLONG, 1067 MYSQL_TYPE_LONGLONG,
1068 &nrc->last_expire, 1068 &nrc->last_expire,
@@ -1071,7 +1071,7 @@ iterator_helper_prepare (void *cls,
1071 &nrc->last_vkey, 1071 &nrc->last_vkey,
1072 GNUNET_YES, 1072 GNUNET_YES,
1073 MYSQL_TYPE_LONGLONG, 1073 MYSQL_TYPE_LONGLONG,
1074 &nrc->now.value, 1074 &nrc->now.abs_value,
1075 GNUNET_YES, -1); 1075 GNUNET_YES, -1);
1076 break; 1076 break;
1077 default: 1077 default:
@@ -1199,7 +1199,7 @@ mysql_next_request_cont (void *next_cls,
1199 exp); 1199 exp);
1200#endif 1200#endif
1201 GNUNET_assert (nrc->plugin->next_task == GNUNET_SCHEDULER_NO_TASK); 1201 GNUNET_assert (nrc->plugin->next_task == GNUNET_SCHEDULER_NO_TASK);
1202 expiration.value = exp; 1202 expiration.abs_value = exp;
1203 ret = nrc->dviter (nrc->dviter_cls, 1203 ret = nrc->dviter (nrc->dviter_cls,
1204 nrc, 1204 nrc,
1205 &key, 1205 &key,
@@ -1368,7 +1368,7 @@ mysql_plugin_put (void *cls,
1368 unsigned int itype = type; 1368 unsigned int itype = type;
1369 unsigned int ipriority = priority; 1369 unsigned int ipriority = priority;
1370 unsigned int ianonymity = anonymity; 1370 unsigned int ianonymity = anonymity;
1371 unsigned long long lexpiration = expiration.value; 1371 unsigned long long lexpiration = expiration.abs_value;
1372 unsigned long hashSize; 1372 unsigned long hashSize;
1373 unsigned long hashSize2; 1373 unsigned long hashSize2;
1374 unsigned long long vkey; 1374 unsigned long long vkey;
@@ -1720,7 +1720,7 @@ mysql_plugin_update (void *cls,
1720{ 1720{
1721 struct Plugin *plugin = cls; 1721 struct Plugin *plugin = cls;
1722 unsigned long long vkey = uid; 1722 unsigned long long vkey = uid;
1723 unsigned long long lexpire = expire.value; 1723 unsigned long long lexpire = expire.abs_value;
1724 int ret; 1724 int ret;
1725 1725
1726#if DEBUG_MYSQL 1726#if DEBUG_MYSQL
diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c
index 3ec38c371..248fe7a96 100644
--- a/src/datastore/plugin_datastore_postgres.c
+++ b/src/datastore/plugin_datastore_postgres.c
@@ -767,12 +767,12 @@ postgres_next_request_cont (void *next_cls,
767 type = ntohl (*(uint32_t *) PQgetvalue (res, 0, 0)); 767 type = ntohl (*(uint32_t *) PQgetvalue (res, 0, 0));
768 priority = ntohl (*(uint32_t *) PQgetvalue (res, 0, 1)); 768 priority = ntohl (*(uint32_t *) PQgetvalue (res, 0, 1));
769 anonymity = ntohl ( *(uint32_t *) PQgetvalue (res, 0, 2)); 769 anonymity = ntohl ( *(uint32_t *) PQgetvalue (res, 0, 2));
770 expiration_time.value = GNUNET_ntohll (*(uint64_t *) PQgetvalue (res, 0, 3)); 770 expiration_time.abs_value = GNUNET_ntohll (*(uint64_t *) PQgetvalue (res, 0, 3));
771 memcpy (&key, PQgetvalue (res, 0, 4), sizeof (GNUNET_HashCode)); 771 memcpy (&key, PQgetvalue (res, 0, 4), sizeof (GNUNET_HashCode));
772 size = PQgetlength (res, 0, 5); 772 size = PQgetlength (res, 0, 5);
773 773
774 nrc->blast_prio = htonl (priority); 774 nrc->blast_prio = htonl (priority);
775 nrc->blast_expire = GNUNET_htonll (expiration_time.value); 775 nrc->blast_expire = GNUNET_htonll (expiration_time.abs_value);
776 nrc->blast_rowid = htonl (rowid); 776 nrc->blast_rowid = htonl (rowid);
777 nrc->count++; 777 nrc->count++;
778 778
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c
index 0a18b9b2f..05ebed7c5 100644
--- a/src/datastore/plugin_datastore_sqlite.c
+++ b/src/datastore/plugin_datastore_sqlite.c
@@ -556,7 +556,7 @@ sqlite_next_request_cont (void *cls,
556 556
557 priority = sqlite3_column_int (nc->stmt, 2); 557 priority = sqlite3_column_int (nc->stmt, 2);
558 anonymity = sqlite3_column_int (nc->stmt, 3); 558 anonymity = sqlite3_column_int (nc->stmt, 3);
559 expiration.value = sqlite3_column_int64 (nc->stmt, 4); 559 expiration.abs_value = sqlite3_column_int64 (nc->stmt, 4);
560 key = sqlite3_column_blob (nc->stmt, 5); 560 key = sqlite3_column_blob (nc->stmt, 5);
561 nc->lastPriority = priority; 561 nc->lastPriority = priority;
562 nc->lastExpiration = expiration; 562 nc->lastExpiration = expiration;
@@ -667,8 +667,8 @@ sqlite_plugin_put (void *cls,
667 type, 667 type,
668 GNUNET_h2s(key), 668 GNUNET_h2s(key),
669 priority, 669 priority,
670 (unsigned long long) GNUNET_TIME_absolute_get_remaining (expiration).value, 670 (unsigned long long) GNUNET_TIME_absolute_get_remaining (expiration).abs_value,
671 (long long) expiration.value); 671 (long long) expiration.abs_value);
672#endif 672#endif
673 GNUNET_CRYPTO_hash (data, size, &vhash); 673 GNUNET_CRYPTO_hash (data, size, &vhash);
674 stmt = plugin->insertContent; 674 stmt = plugin->insertContent;
@@ -676,7 +676,7 @@ sqlite_plugin_put (void *cls,
676 (SQLITE_OK != sqlite3_bind_int (stmt, 2, type)) || 676 (SQLITE_OK != sqlite3_bind_int (stmt, 2, type)) ||
677 (SQLITE_OK != sqlite3_bind_int (stmt, 3, priority)) || 677 (SQLITE_OK != sqlite3_bind_int (stmt, 3, priority)) ||
678 (SQLITE_OK != sqlite3_bind_int (stmt, 4, anonymity)) || 678 (SQLITE_OK != sqlite3_bind_int (stmt, 4, anonymity)) ||
679 (SQLITE_OK != sqlite3_bind_int64 (stmt, 5, expiration.value)) || 679 (SQLITE_OK != sqlite3_bind_int64 (stmt, 5, expiration.abs_value)) ||
680 (SQLITE_OK != 680 (SQLITE_OK !=
681 sqlite3_bind_blob (stmt, 6, key, sizeof (GNUNET_HashCode), 681 sqlite3_bind_blob (stmt, 6, key, sizeof (GNUNET_HashCode),
682 SQLITE_TRANSIENT)) || 682 SQLITE_TRANSIENT)) ||
@@ -763,7 +763,7 @@ sqlite_plugin_update (void *cls,
763 int n; 763 int n;
764 764
765 sqlite3_bind_int (plugin->updPrio, 1, delta); 765 sqlite3_bind_int (plugin->updPrio, 1, delta);
766 sqlite3_bind_int64 (plugin->updPrio, 2, expire.value); 766 sqlite3_bind_int64 (plugin->updPrio, 2, expire.abs_value);
767 sqlite3_bind_int64 (plugin->updPrio, 3, uid); 767 sqlite3_bind_int64 (plugin->updPrio, 3, uid);
768 n = sqlite3_step (plugin->updPrio); 768 n = sqlite3_step (plugin->updPrio);
769 if (n != SQLITE_DONE) 769 if (n != SQLITE_DONE)
@@ -871,10 +871,10 @@ iter_next_prepare (void *cls,
871#if DEBUG_SQLITE 871#if DEBUG_SQLITE
872 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 872 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
873 "Restricting to results larger than the last expiration %llu\n", 873 "Restricting to results larger than the last expiration %llu\n",
874 (unsigned long long) nc->lastExpiration.value); 874 (unsigned long long) nc->lastExpiration.abs_value);
875#endif 875#endif
876 sqlite3_bind_int64 (ic->stmt_1, 1, nc->lastExpiration.value); 876 sqlite3_bind_int64 (ic->stmt_1, 1, nc->lastExpiration.abs_value);
877 sqlite3_bind_int64 (ic->stmt_2, 1, nc->lastExpiration.value); 877 sqlite3_bind_int64 (ic->stmt_2, 1, nc->lastExpiration.abs_value);
878 } 878 }
879#if DEBUG_SQLITE 879#if DEBUG_SQLITE
880 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 880 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -974,7 +974,7 @@ basic_iter (struct Plugin *plugin,
974#if DEBUG_SQLITE 974#if DEBUG_SQLITE
975 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 975 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
976 "At %llu, using queries `%s' and `%s'\n", 976 "At %llu, using queries `%s' and `%s'\n",
977 (unsigned long long) GNUNET_TIME_absolute_get ().value, 977 (unsigned long long) GNUNET_TIME_absolute_get ().abs_value,
978 stmt_str_1, 978 stmt_str_1,
979 stmt_str_2); 979 stmt_str_2);
980#endif 980#endif
@@ -1014,13 +1014,13 @@ basic_iter (struct Plugin *plugin,
1014 if (is_asc) 1014 if (is_asc)
1015 { 1015 {
1016 nc->lastPriority = 0; 1016 nc->lastPriority = 0;
1017 nc->lastExpiration.value = 0; 1017 nc->lastExpiration.abs_value = 0;
1018 memset (&nc->lastKey, 0, sizeof (GNUNET_HashCode)); 1018 memset (&nc->lastKey, 0, sizeof (GNUNET_HashCode));
1019 } 1019 }
1020 else 1020 else
1021 { 1021 {
1022 nc->lastPriority = 0x7FFFFFFF; 1022 nc->lastPriority = 0x7FFFFFFF;
1023 nc->lastExpiration.value = 0x7FFFFFFFFFFFFFFFLL; 1023 nc->lastExpiration.abs_value = 0x7FFFFFFFFFFFFFFFLL;
1024 memset (&nc->lastKey, 255, sizeof (GNUNET_HashCode)); 1024 memset (&nc->lastKey, 255, sizeof (GNUNET_HashCode));
1025 } 1025 }
1026 sqlite_next_request (nc, GNUNET_NO); 1026 sqlite_next_request (nc, GNUNET_NO);
@@ -1077,9 +1077,9 @@ sqlite_plugin_iter_zero_anonymity (void *cls,
1077 1077
1078 now = GNUNET_TIME_absolute_get (); 1078 now = GNUNET_TIME_absolute_get ();
1079 GNUNET_asprintf (&q1, SELECT_IT_NON_ANONYMOUS_1, 1079 GNUNET_asprintf (&q1, SELECT_IT_NON_ANONYMOUS_1,
1080 (unsigned long long) now.value); 1080 (unsigned long long) now.abs_value);
1081 GNUNET_asprintf (&q2, SELECT_IT_NON_ANONYMOUS_2, 1081 GNUNET_asprintf (&q2, SELECT_IT_NON_ANONYMOUS_2,
1082 (unsigned long long) now.value); 1082 (unsigned long long) now.abs_value);
1083 basic_iter (cls, 1083 basic_iter (cls,
1084 type, 1084 type,
1085 GNUNET_NO, GNUNET_YES, 1085 GNUNET_NO, GNUNET_YES,
@@ -1116,9 +1116,9 @@ sqlite_plugin_iter_ascending_expiration (void *cls,
1116 1116
1117 now = GNUNET_TIME_absolute_get (); 1117 now = GNUNET_TIME_absolute_get ();
1118 GNUNET_asprintf (&q1, SELECT_IT_EXPIRATION_TIME_1, 1118 GNUNET_asprintf (&q1, SELECT_IT_EXPIRATION_TIME_1,
1119 (unsigned long long) 0*now.value); 1119 (unsigned long long) 0*now.abs_value);
1120 GNUNET_asprintf (&q2, SELECT_IT_EXPIRATION_TIME_2, 1120 GNUNET_asprintf (&q2, SELECT_IT_EXPIRATION_TIME_2,
1121 (unsigned long long) 0*now.value); 1121 (unsigned long long) 0*now.abs_value);
1122 basic_iter (cls, 1122 basic_iter (cls,
1123 type, 1123 type,
1124 GNUNET_YES, GNUNET_NO, 1124 GNUNET_YES, GNUNET_NO,
@@ -1152,7 +1152,7 @@ sqlite_plugin_iter_migration_order (void *cls,
1152 1152
1153 now = GNUNET_TIME_absolute_get (); 1153 now = GNUNET_TIME_absolute_get ();
1154 GNUNET_asprintf (&q, SELECT_IT_MIGRATION_ORDER_2, 1154 GNUNET_asprintf (&q, SELECT_IT_MIGRATION_ORDER_2,
1155 (unsigned long long) now.value); 1155 (unsigned long long) now.abs_value);
1156 basic_iter (cls, 1156 basic_iter (cls,
1157 type, 1157 type,
1158 GNUNET_NO, GNUNET_NO, 1158 GNUNET_NO, GNUNET_NO,
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c
index 10a195cfb..ae7782d6c 100644
--- a/src/datastore/test_datastore_api.c
+++ b/src/datastore/test_datastore_api.c
@@ -95,7 +95,7 @@ get_expiration (int i)
95{ 95{
96 struct GNUNET_TIME_Absolute av; 96 struct GNUNET_TIME_Absolute av;
97 97
98 av.value = now.value + 20000000 - i * 1000; 98 av.abs_value = now.abs_value + 20000000 - i * 1000;
99 return av; 99 return av;
100} 100}
101 101
@@ -213,7 +213,7 @@ check_value (void *cls,
213 GNUNET_assert (type == get_type (i)); 213 GNUNET_assert (type == get_type (i));
214 GNUNET_assert (priority == get_priority (i)); 214 GNUNET_assert (priority == get_priority (i));
215 GNUNET_assert (anonymity == get_anonymity(i)); 215 GNUNET_assert (anonymity == get_anonymity(i));
216 GNUNET_assert (expiration.value == get_expiration(i).value); 216 GNUNET_assert (expiration.abs_value == get_expiration(i).abs_value);
217 GNUNET_DATASTORE_get_next (datastore, GNUNET_YES); 217 GNUNET_DATASTORE_get_next (datastore, GNUNET_YES);
218} 218}
219 219
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c
index 8e49409b6..72760de7a 100644
--- a/src/datastore/test_datastore_api_management.c
+++ b/src/datastore/test_datastore_api_management.c
@@ -91,7 +91,7 @@ get_expiration (int i)
91{ 91{
92 struct GNUNET_TIME_Absolute av; 92 struct GNUNET_TIME_Absolute av;
93 93
94 av.value = now.value + i * 1000; 94 av.abs_value = now.abs_value + i * 1000;
95 return av; 95 return av;
96} 96}
97 97
@@ -183,7 +183,7 @@ check_value (void *cls,
183 GNUNET_assert (type == get_type (i)); 183 GNUNET_assert (type == get_type (i));
184 GNUNET_assert (priority == get_priority (i)); 184 GNUNET_assert (priority == get_priority (i));
185 GNUNET_assert (anonymity == get_anonymity(i)); 185 GNUNET_assert (anonymity == get_anonymity(i));
186 GNUNET_assert (expiration.value == get_expiration(i).value); 186 GNUNET_assert (expiration.abs_value == get_expiration(i).abs_value);
187 GNUNET_DATASTORE_get_next (datastore, GNUNET_YES); 187 GNUNET_DATASTORE_get_next (datastore, GNUNET_YES);
188} 188}
189 189