summaryrefslogtreecommitdiff
path: root/src/pq
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-05-07 14:01:26 +0200
committerChristian Grothoff <christian@grothoff.org>2015-05-07 14:01:26 +0200
commit292b6cf265ab2699c53796de1a2b89348202e184 (patch)
treeacd76e6a4c9f879168e08bdeae4b204c84dbd6ba /src/pq
parent17055134a3df2c9d84aec69b1da1cb3c273a55fb (diff)
downloadexchange-292b6cf265ab2699c53796de1a2b89348202e184.tar.gz
exchange-292b6cf265ab2699c53796de1a2b89348202e184.tar.bz2
exchange-292b6cf265ab2699c53796de1a2b89348202e184.zip
note (theoretical) problem with 64 vs 63 bit integers
Diffstat (limited to 'src/pq')
-rw-r--r--src/pq/db_pq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pq/db_pq.c b/src/pq/db_pq.c
index 1decd3bb..74126750 100644
--- a/src/pq/db_pq.c
+++ b/src/pq/db_pq.c
@@ -176,6 +176,8 @@ TALER_PQ_exec_prepared (PGconn *db_conn,
at_nbo = GNUNET_new (struct GNUNET_TIME_AbsoluteNBO);
scratch[soff++] = at_nbo;
+ /* FIXME: this does not work for 'forever' as PQ uses 63-bit integers;
+ should check and handle! (Need testcase!) */
*at_nbo = GNUNET_TIME_absolute_hton (*at_hbo);
param_values[off] = (void *) at_nbo;
param_lengths[off] = sizeof (struct GNUNET_TIME_AbsoluteNBO);
@@ -523,6 +525,8 @@ TALER_PQ_extract_result (PGresult *result,
PQgetvalue (result,
row,
fnum);
+ /* FIXME: this does not work for 'forever' as PQ uses 63-bit integers;
+ should check and handle! (Need testcase!) */
*dst = GNUNET_TIME_absolute_ntoh (*res);
break;
}