aboutsummaryrefslogtreecommitdiff
path: root/src/pq/pq_connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pq/pq_connect.c')
-rw-r--r--src/pq/pq_connect.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c
index 7599f4b15..882df4f89 100644
--- a/src/pq/pq_connect.c
+++ b/src/pq/pq_connect.c
@@ -128,6 +128,20 @@ GNUNET_PQ_connect (const char *config_str,
128 128
129 129
130/** 130/**
131 * Reinitialize the database @a db if the connection is down.
132 *
133 * @param db database connection to reinitialize
134 */
135void
136GNUNET_PQ_reconnect_if_down (struct GNUNET_PQ_Context *db)
137{
138 if (CONNECTION_BAD != PQstatus (db->conn))
139 return;
140 GNUNET_PQ_reconnect (db);
141}
142
143
144/**
131 * Reinitialize the database @a db. 145 * Reinitialize the database @a db.
132 * 146 *
133 * @param db database connection to reinitialize 147 * @param db database connection to reinitialize