summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/urweb.h1
-rw-r--r--src/c/urweb.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/urweb.h b/include/urweb.h
index 75239c62..1ea75417 100644
--- a/include/urweb.h
+++ b/include/urweb.h
@@ -21,6 +21,7 @@ void uw_prune_clients(uw_context);
failure_kind uw_initialize(uw_context);
uw_context uw_init(void);
+void uw_close(uw_context);
int uw_set_app(uw_context, uw_app*);
void uw_set_db(uw_context, void*);
void *uw_get_db(uw_context);
diff --git a/src/c/urweb.c b/src/c/urweb.c
index fccb1756..f52fc459 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -578,6 +578,10 @@ failure_kind uw_begin_init(uw_context ctx) {
return r;
}
+void uw_close(uw_context ctx) {
+ ctx->app->db_close(ctx);
+}
+
void uw_set_headers(uw_context ctx, char *(*get_header)(void *, const char *), void *get_header_data) {
ctx->get_header = get_header;
ctx->get_header_data = get_header_data;