aboutsummaryrefslogtreecommitdiff
path: root/src/dbrw.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbrw.h')
-rw-r--r--src/dbrw.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dbrw.h b/src/dbrw.h
index 438d963..7a0ee52 100644
--- a/src/dbrw.h
+++ b/src/dbrw.h
@@ -1,5 +1,5 @@
/* This file is part of vmod-dbrw
- Copyright (C) 2013-2017 Sergey Poznyakoff
+ Copyright (C) 2013-2018 Sergey Poznyakoff
Vmod-dbrw is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -43,6 +43,7 @@ struct dbrw_backend {
int (*sql_free_result) (struct dbrw_connection *);
const char *(*sql_get_column)(struct dbrw_connection *, unsigned,
unsigned);
+ int (*sql_idle_timeout)(struct dbrw_connection *);
};
enum {
@@ -66,6 +67,7 @@ struct dbrw_config {
int qdisp;
int regflags;
char status[HTTP_STATUS_LEN+1];
+ int idle_timeout;
VTAILQ_ENTRY(dbrw_config) list;
};
@@ -77,6 +79,7 @@ struct dbrw_connection {
struct dbrw_config *conf; /* Pointer to the configuration data */
regmatch_t *matches; /* Match map */
size_t matchsize; /* Total number of entries in match map */
+ time_t timestamp; /* Last used at */
void *data; /* Backend-specific data */
VTAILQ_ENTRY(dbrw_connection) list;
};
@@ -105,6 +108,7 @@ unsigned sql_num_fields(struct dbrw_connection *pd);
void sql_free_result(struct dbrw_connection *pd);
void sql_destroy(struct dbrw_connection *pd);
const char *sql_get_column(struct dbrw_connection *pd, unsigned row, unsigned col);
+int sql_idle_timeout(struct dbrw_connection *conn);
char *findparam(char **params, char *name);

Return to:

Send suggestions and report system problems to the System administrator.