diff options
author | Trumeet <yuuta@yuuta.moe> | 2022-11-18 17:38:46 -0800 |
---|---|---|
committer | Trumeet <yuuta@yuuta.moe> | 2022-11-18 17:38:46 -0800 |
commit | d6729a4a29baa5aecfc858388df5b4373916a894 (patch) | |
tree | 17be2562a3ae22c709ccb544209c6455ef7d0e9a | |
parent | 3ebff2e47ab77a74fd9905896046ef66531b2b14 (diff) | |
download | hitokoto-d6729a4a29baa5aecfc858388df5b4373916a894.tar hitokoto-d6729a4a29baa5aecfc858388df5b4373916a894.tar.gz hitokoto-d6729a4a29baa5aecfc858388df5b4373916a894.tar.bz2 hitokoto-d6729a4a29baa5aecfc858388df5b4373916a894.zip |
Fix error
-rw-r--r-- | PKGBUILD | 2 | ||||
-rw-r--r-- | m2.c | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -11,7 +11,7 @@ groups=() depends=(sqlite3 fcgi) source=("m2.c" "init.sql") -sha256sums=('80aa15bca8361fd4430c114be633e024ee10df84e9a2d6b8939c5ab5407eeb38' +sha256sums=('46edb0078fb53ea6c66e6909795484db7efded7b904a0e4736e90d7c721b2aad' 'e71a00dfb9a2744f482de80e33c02341d6cae19a1f54e53a5346d972bfeff054') build() { @@ -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" |