diff options
author | Vincent Douillet <vincent@vdouillet.fr> | 2023-07-31 17:34:24 +0200 |
---|---|---|
committer | Vincent Douillet <vincent@vdouillet.fr> | 2023-08-01 18:14:47 +0200 |
commit | 62b01654da4f1ae1a9aaeab106cea5e7bb9d77e3 (patch) | |
tree | 275b99f1fe4d12777f389045d6cd8411d5e6f324 /main.c | |
parent | 89a76cdd3fa168902d83f4c043d2cc6629b40024 (diff) |
handle kcgi errors
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -29,10 +29,10 @@ */ #include <stdlib.h> -#include <kcgi.h> #include <unistd.h> #include "browse.h" +#include "cgi.h" #include "http.h" enum page { @@ -47,14 +47,10 @@ static const char *const pages[PAGE__MAX] = { int main(void) { - enum kcgi_err err; - int page_ret_val; - struct kreq r; + int page_ret_val; + struct kreq r; - err = khttp_parse(&r, NULL, 0, pages, PAGE__MAX, PAGE_BROWSE); - - if (KCGI_OK != err) - return EXIT_FAILURE; + K_OK(khttp_parse(&r, NULL, 0, pages, PAGE__MAX, PAGE_BROWSE)); /* * Make sure basic request parameters are as expected : GET or POST, |