From fddc6610d724dc08433ea99a98406d76c47e9df1 Mon Sep 17 00:00:00 2001 From: Vincent Douillet Date: Thu, 26 Dec 2024 18:13:42 +0100 Subject: remove http_ret --- main.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 8042a00..bd5c33d 100644 --- a/main.c +++ b/main.c @@ -62,7 +62,6 @@ main(void) char *data_dir; enum kcgi_err parse_err; struct kreq r; - struct http_ret ret; if (kutil_openlog(LOG_FILE) == 0) http_exit(NULL, KHTTP_500, "Unable to open %s", LOG_FILE); @@ -97,16 +96,16 @@ main(void) case PAGE_BROWSE: if (r.mime != KMIME_TEXT_HTML) http_exit(&r, KHTTP_406, NULL); /* Not Acceptable */ - ret = browse(&r); + browse(&r); break; case PAGE_DOWNLOAD: - ret = download(&r); + download(&r); break; case PAGE_UPLOAD: - ret = upload(&r); + upload(&r); break; case PAGE_DELETE: - ret = del(&r); + del(&r); break; default: http_exit(&r, KHTTP_404, NULL); @@ -114,8 +113,5 @@ main(void) khttp_free(&r); - if (ret.code >= KHTTP_400) - http_exit(&r, ret.code, ret.message); - return EXIT_SUCCESS; } -- cgit v1.2.3