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 ddd190968368822ce1432bc51bf8280ba5b7e1af..4880727f6b01b4f1e02b54afd5cbb4152cea65ef 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;
+               cl->dispatch.proc.status_code = atoi(buf);
                return;
        }