aboutsummaryrefslogtreecommitdiff
path: root/m2.c
diff options
context:
space:
mode:
Diffstat (limited to 'm2.c')
-rw-r--r--m2.c3
1 files changed, 2 insertions, 1 deletions
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"