aboutsummaryrefslogtreecommitdiff
path: root/src/sql.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sql.c')
-rw-r--r--src/sql.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/sql.c b/src/sql.c
index c42c5de..3acd9de 100644
--- a/src/sql.c
+++ b/src/sql.c
@@ -1,3 +1,3 @@
/* This file is part of vmod-dbrw
- Copyright (C) 2013-2014 Sergey Poznyakoff
+ Copyright (C) 2013-2018 Sergey Poznyakoff
@@ -145,2 +145,3 @@ sql_query(struct dbrw_connection *conn, const char *input)
} while (conn->state != state_connected);
+ conn->timestamp = time(NULL);
if (conn->conf->backend->sql_query(conn, input) == 0)
@@ -187 +188,9 @@ sql_get_column(struct dbrw_connection *conn, unsigned row, unsigned col)
+int
+sql_idle_timeout(struct dbrw_connection *conn)
+{
+ CONN_ASSERT_VAL(conn, -1);
+ if (!conn->conf->backend->sql_idle_timeout)
+ return -1;
+ return conn->conf->backend->sql_idle_timeout(conn);
+}

Return to:

Send suggestions and report system problems to the System administrator.