diff options
author | wachs <wachs@140774ce-b5e7-0310-ab8b-a85725594a96> | 2010-10-27 09:38:04 +0000 |
---|---|---|
committer | wachs <wachs@140774ce-b5e7-0310-ab8b-a85725594a96> | 2010-10-27 09:38:04 +0000 |
commit | f7dd9ab9e8ba65a462bd25ca1da57b5710f3c5b3 (patch) | |
tree | 86a488d381ff8443f6b9de6a23708edb042a75f2 /src/datacache/plugin_datacache_sqlite.c | |
parent | 1dfa875c726cf1cb2d6ae54d4e6265d3cb4d7303 (diff) |
Refactoring gnunet time
git-svn-id: https://gnunet.org/svn/gnunet@13418 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/datacache/plugin_datacache_sqlite.c')
-rw-r--r-- | src/datacache/plugin_datacache_sqlite.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/datacache/plugin_datacache_sqlite.c b/src/datacache/plugin_datacache_sqlite.c index 5c304bd8ad..95b65cb10a 100644 --- a/src/datacache/plugin_datacache_sqlite.c +++ b/src/datacache/plugin_datacache_sqlite.c @@ -112,9 +112,9 @@ sqlite_plugin_put (void *cls, "PUT", (unsigned int) size, GNUNET_h2s (key), - (unsigned long long) GNUNET_TIME_absolute_get_remaining (discard_time).value); + (unsigned long long) GNUNET_TIME_absolute_get_remaining (discard_time).rel_value); #endif - dval = (int64_t) discard_time.value; + dval = (int64_t) discard_time.abs_value; if (dval < 0) dval = INT64_MAX; if (sq_prepare (plugin->dbh, @@ -206,9 +206,9 @@ sqlite_plugin_get (void *cls, sqlite3_bind_blob (stmt, 1, key, sizeof (GNUNET_HashCode), SQLITE_TRANSIENT); sqlite3_bind_int (stmt, 2, type); - ntime = (int64_t) now.value; + ntime = (int64_t) now.abs_value; GNUNET_assert (ntime >= 0); - sqlite3_bind_int64 (stmt, 3, now.value); + sqlite3_bind_int64 (stmt, 3, now.abs_value); if (SQLITE_ROW != sqlite3_step (stmt)) { LOG_SQLITE (plugin->dbh, @@ -242,13 +242,13 @@ sqlite_plugin_get (void *cls, sqlite3_bind_blob (stmt, 1, key, sizeof (GNUNET_HashCode), SQLITE_TRANSIENT); sqlite3_bind_int (stmt, 2, type); - sqlite3_bind_int64 (stmt, 3, now.value); + sqlite3_bind_int64 (stmt, 3, now.abs_value); if (sqlite3_step (stmt) != SQLITE_ROW) break; size = sqlite3_column_bytes (stmt, 0); dat = sqlite3_column_blob (stmt, 0); - exp.value = sqlite3_column_int64 (stmt, 1); - ntime = (int64_t) exp.value; + exp.abs_value = sqlite3_column_int64 (stmt, 1); + ntime = (int64_t) exp.abs_value; if (ntime == INT64_MAX) exp = GNUNET_TIME_UNIT_FOREVER_ABS; cnt++; |