fix range check, fix NULL check, fix plugin linkage

This commit is contained in:
Christian Grothoff 2015-06-18 16:41:36 +02:00
parent 37bf816873
commit 044403701d
4 changed files with 13 additions and 7 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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

View File

@ -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)