summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-03-12 12:29:46 +0100
committerChristian Grothoff <christian@grothoff.org>2018-03-12 12:29:46 +0100
commit9b56f3e95fb3d6a80e0ab46b35c779ce01332b0d (patch)
tree698e926941ce8c57bb2daca915e1a2339f08c1d0 /src/include
parent5f64092af04ceef6a1962969fbee1bcaea8548c2 (diff)
downloadmerchant-9b56f3e95fb3d6a80e0ab46b35c779ce01332b0d.tar.gz
merchant-9b56f3e95fb3d6a80e0ab46b35c779ce01332b0d.tar.bz2
merchant-9b56f3e95fb3d6a80e0ab46b35c779ce01332b0d.zip
implementing #5281 guards against hanging transactions, plus minor code cleanups
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_merchantdb_plugin.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h
index 6f497b00..614d5dd7 100644
--- a/src/include/taler_merchantdb_plugin.h
+++ b/src/include/taler_merchantdb_plugin.h
@@ -758,10 +758,24 @@ struct TALER_MERCHANTDB_Plugin
* Start a transaction.
*
* @param cls the `struct PostgresClosure` with the plugin-specific state
+ * @param name unique name identifying the transaction (for debugging),
+ * must point to a constant
* @return #GNUNET_OK on success
*/
int
- (*start) (void *cls);
+ (*start) (void *cls,
+ const char *name);
+
+
+ /**
+ * Do a pre-flight check that we are not in an uncommitted transaction.
+ * If we are, try to commit the previous transaction and output a warning.
+ * Does not return anything, as we will continue regardless of the outcome.
+ *
+ * @param cls the `struct PostgresClosure` with the plugin-specific state
+ */
+ void
+ (*preflight) (void *cls);
/**