summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-06-18 16:41:36 +0200
committerChristian Grothoff <christian@grothoff.org>2015-06-18 16:41:36 +0200
commit044403701dadd296775215ac85e4bfe0000ebc6c (patch)
treec7daf9a7415a37da23ff9755a8d118a10d17c552 /src
parent37bf816873ac6b8b4e2e69e9c7037046d971dfff (diff)
downloadexchange-044403701dadd296775215ac85e4bfe0000ebc6c.tar.gz
exchange-044403701dadd296775215ac85e4bfe0000ebc6c.tar.bz2
exchange-044403701dadd296775215ac85e4bfe0000ebc6c.zip
fix range check, fix NULL check, fix plugin linkage
Diffstat (limited to 'src')
-rw-r--r--src/mint/taler-mint-httpd.c7
-rw-r--r--src/mint/taler-mint-httpd_db.c5
-rw-r--r--src/mint/taler-mint-httpd_keystate.c6
-rw-r--r--src/mintdb/Makefile.am2
4 files changed, 13 insertions, 7 deletions
diff --git a/src/mint/taler-mint-httpd.c b/src/mint/taler-mint-httpd.c
index d74ecf022..51cb14c88 100644
--- a/src/mint/taler-mint-httpd.c
+++ b/src/mint/taler-mint-httpd.c
@@ -474,8 +474,11 @@ main (int argc, char *const *argv)
session = TMH_plugin->get_session (TMH_plugin->cls,
GNUNET_YES);
- TMH_plugin->drop_temporary (TMH_plugin->cls,
- session);
+ if (NULL == session)
+ GNUNET_break (0);
+ else
+ TMH_plugin->drop_temporary (TMH_plugin->cls,
+ session);
}
TALER_MINTDB_plugin_unload (TMH_plugin);
diff --git a/src/mint/taler-mint-httpd_db.c b/src/mint/taler-mint-httpd_db.c
index c51f58205..78a8d6f40 100644
--- a/src/mint/taler-mint-httpd_db.c
+++ b/src/mint/taler-mint-httpd_db.c
@@ -613,9 +613,8 @@ TMH_DB_execute_refresh_melt (struct MHD_Connection *connection,
int res;
unsigned int i;
- if (NULL ==
- (session = TMH_plugin->get_session (TMH_plugin->cls,
- TMH_test_mode)))
+ if (NULL == (session = TMH_plugin->get_session (TMH_plugin->cls,
+ TMH_test_mode)))
{
GNUNET_break (0);
return TMH_RESPONSE_reply_internal_db_error (connection);
diff --git a/src/mint/taler-mint-httpd_keystate.c b/src/mint/taler-mint-httpd_keystate.c
index fc0e1413d..56d6feb42 100644
--- a/src/mint/taler-mint-httpd_keystate.c
+++ b/src/mint/taler-mint-httpd_keystate.c
@@ -211,7 +211,7 @@ reload_keys_denom_iter (void *cls,
int res;
horizon = GNUNET_TIME_relative_to_absolute (TALER_MINT_conf_duration_provide ());
- if (GNUNET_TIME_absolute_ntoh (dki->issue.expire_spend).abs_value_us >
+ if (GNUNET_TIME_absolute_ntoh (dki->issue.start).abs_value_us >
horizon.abs_value_us)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -235,7 +235,9 @@ reload_keys_denom_iter (void *cls,
&denom_key_hash,
sizeof (struct GNUNET_HashCode));
session = TMH_plugin->get_session (TMH_plugin->cls,
- GNUNET_NO);
+ TMH_test_mode);
+ if (NULL == session)
+ return GNUNET_SYSERR;
/* Try to insert DKI into DB until we succeed; note that if the DB
failure is persistent, this code may loop forever (as there is no
sane alternative, we cannot continue without the DKI being in the
diff --git a/src/mintdb/Makefile.am b/src/mintdb/Makefile.am
index 863be8862..a2bc5e3b4 100644
--- a/src/mintdb/Makefile.am
+++ b/src/mintdb/Makefile.am
@@ -23,6 +23,8 @@ libtaler_plugin_mintdb_postgres_la_LIBADD = \
$(LTLIBINTL)
libtaler_plugin_mintdb_postgres_la_LDFLAGS = \
$(TALER_PLUGIN_LDFLAGS) \
+ $(top_builddir)/src/pq/libtalerpq.la \
+ $(top_builddir)/src/util/libtalerutil.la \
-lpq \
-lgnunetutil $(XLIB)