From d6729a4a29baa5aecfc858388df5b4373916a894 Mon Sep 17 00:00:00 2001 From: Trumeet Date: Fri, 18 Nov 2022 17:38:46 -0800 Subject: Fix error --- PKGBUILD | 2 +- m2.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 9f9338d..41aadf3 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -11,7 +11,7 @@ groups=() depends=(sqlite3 fcgi) source=("m2.c" "init.sql") -sha256sums=('80aa15bca8361fd4430c114be633e024ee10df84e9a2d6b8939c5ab5407eeb38' +sha256sums=('46edb0078fb53ea6c66e6909795484db7efded7b904a0e4736e90d7c721b2aad' 'e71a00dfb9a2744f482de80e33c02341d6cae19a1f54e53a5346d972bfeff054') build() { diff --git a/m2.c b/m2.c index 6250e23..be250a8 100644 --- a/m2.c +++ b/m2.c @@ -25,13 +25,14 @@ static void cleanup(void) { static int cb(void *dat, int count, char **data, char **columns) { struct fcgi_env *env = dat; - if (count != 3) { + if (count != 4) { FCGX_FPrintF(env->out, "Status: 500 Internal Server Error\r\n" "Content-type: text/plain\r\n" "\r\n" "The database returned %d columns.\n", count); + return 1; } FCGX_FPrintF(env->out, "Content-type: application/json\r\n" -- cgit v1.2.3