diff options
Diffstat (limited to 'app/httpd.c')
-rw-r--r-- | app/httpd.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/app/httpd.c b/app/httpd.c index 3fdea93..b3776c3 100644 --- a/app/httpd.c +++ b/app/httpd.c @@ -257,19 +257,24 @@ static const char *cgi_set_handler (int idx, int num_params, char *params[], cha int fs_open_custom (struct fs_file *file, const char *name) { - int len; - if (!strcmp (name, "/index.html")) - len = make_index(); - else if (!strcmp (name, "/alarm.html")) - len = make_alarm(); + if (!strcmp (name, "/index.html")) { + file->data = (const char *)html_buf; + file->len = make_index(); + } + else if (!strcmp (name, "/alarm.html")) { + file->data = (const char *)html_buf; + file->len = make_alarm(); + } + else if (!strcmp (name, "/meteotime.dat")) { + file->data = (const char *)meteotime_data; + file->len=sizeof(meteotime_data); + } else { printf ("looking for url=%s, found nothing\n", name); return 0; } - file->data = (const char *)html_buf; - file->len = len; file->index = file->len; file->pextension = NULL; file->flags = 0; |