HOme Sheriff And Lamp
Dependencies: CameraC328 HCSR04 SDFileSystem WIZnetInterface mbed
Fork of HoSAL by
Diff: rev_httpFile.cpp
- Revision:
- 13:cefc034543a5
- Parent:
- 12:974f7a96d6ab
--- a/rev_httpFile.cpp Thu Aug 13 18:35:55 2015 +0000
+++ b/rev_httpFile.cpp Thu Aug 13 19:35:01 2015 +0000
@@ -60,9 +60,7 @@
if (subDir != NULL) {
sprintf(httpHeader,"<li><a href=\"./%s/\">%s/</a></li>", p->d_name, p->d_name);
} else {
- //strlen(p->d_name);
- sprintf(httpHeader,"<li><a href=\"./%s\">%s</a></li>", p->d_name, p->d_name);
- //sprintf(httpHeader,"<li><img width=50 height=50 src=\"./%s\">%s</li>", p->d_name, p->d_name);
+ sprintf(httpHeader,"<li><a href=\"./image.html?%s\">%s</a></li>", p->d_name, p->d_name);
}
client.send(httpHeader,strlen(httpHeader));
}
@@ -72,7 +70,9 @@
sprintf(httpHeader,"</ul></body></html>");
client.send(httpHeader,strlen(httpHeader));
} else {
+ char *strFind;
sprintf(fileName, "/sd%s", uri);
+ if((strFind = strstr(fileName, "?")) != NULL) *strFind = NULL; // remove parameter
fp = fopen(fileName, "r");
if (fp == NULL) {
DM_FLN("File not found");
@@ -95,7 +95,7 @@
}
}
-void fileServer(void const *data)
+void fileServer(/*void const *data*/)
{
int ret;
