From b47fbe59f61f0caca02e370c983f12a1ff3bf6d0 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 5 Jan 2010 14:57:35 -0500 Subject: uw_close() --- include/urweb.h | 1 + src/c/urweb.c | 4 ++++ 2 files changed, 5 insertions(+) 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; -- cgit v1.2.3