From a95c2cf6c1915ba706b06d1c4ad1fd79f2f81aa4 Mon Sep 17 00:00:00 2001 From: Fredrik Osterlind Date: Tue, 29 May 2012 17:40:33 +0200 Subject: [PATCH] bugfix: ptr must be preserved until psock has finished --- apps/webserver-nano/httpd-cfs.c | 2 +- apps/webserver/httpd-cfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/webserver-nano/httpd-cfs.c b/apps/webserver-nano/httpd-cfs.c index fb6fb56b3..64c164004 100644 --- a/apps/webserver-nano/httpd-cfs.c +++ b/apps/webserver-nano/httpd-cfs.c @@ -106,7 +106,7 @@ PT_THREAD(send_string(struct httpd_state *s, const char *str)) static PT_THREAD(send_headers(struct httpd_state *s, const char *statushdr)) { - const char *ptr; + static const char *ptr; PSOCK_BEGIN(&s->sout); diff --git a/apps/webserver/httpd-cfs.c b/apps/webserver/httpd-cfs.c index fb6fb56b3..64c164004 100644 --- a/apps/webserver/httpd-cfs.c +++ b/apps/webserver/httpd-cfs.c @@ -106,7 +106,7 @@ PT_THREAD(send_string(struct httpd_state *s, const char *str)) static PT_THREAD(send_headers(struct httpd_state *s, const char *statushdr)) { - const char *ptr; + static const char *ptr; PSOCK_BEGIN(&s->sout);