parse status header code from cgi scripts
authorFelix Fietkau <nbd@openwrt.org>
Wed, 2 Jan 2013 11:08:09 +0000 (12:08 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 2 Jan 2013 11:08:09 +0000 (12:08 +0100)
proc.c

diff --git a/proc.c b/proc.c
index ddd1909..4880727 100644 (file)
--- a/proc.c
+++ b/proc.c
@@ -178,6 +178,7 @@ static void proc_handle_header(struct relay *r, const char *name, const char *va
                buf[3] = 0;
                snprintf(status_buf, sizeof(status_buf), "%s", sep + 1);
                cl->dispatch.proc.status_msg = status_buf;
                buf[3] = 0;
                snprintf(status_buf, sizeof(status_buf), "%s", sep + 1);
                cl->dispatch.proc.status_msg = status_buf;
+               cl->dispatch.proc.status_code = atoi(buf);
                return;
        }
 
                return;
        }