HOme Sheriff And Lamp
Dependencies: CameraC328 HCSR04 SDFileSystem WIZnetInterface mbed
Fork of HoSAL by
Diff: rev_httpFile.cpp
- Revision:
- 5:217f40f0a415
- Parent:
- 3:8c4e0e7c8cea
- Child:
- 10:0868448017da
diff -r ca368c50f8c9 -r 217f40f0a415 rev_httpFile.cpp --- a/rev_httpFile.cpp Tue Aug 11 17:46:53 2015 +0000 +++ b/rev_httpFile.cpp Tue Aug 11 17:52:59 2015 +0000 @@ -84,7 +84,7 @@ DM_FLN(" file"); while ((rdCnt = fread(buffer, sizeof( char ), HTTPD_MAX_REQ_LENGTH, fp)) == HTTPD_MAX_REQ_LENGTH) { client.send(buffer, rdCnt); - DM_FLN("."); + DM_("."); } client.send(buffer, rdCnt); fclose(fp); @@ -95,9 +95,11 @@ void fileServer(void) { - - DM_FLN(_N_"Wait for new connection..."); - server.accept(client); + int ret; + + //DM_FLN("Wait for new connection..."); + ret = server.accept(client); + if(ret < 0) return; client.set_blocking(false, 1500); // Timeout after 1500ms DM_FLN("Connection from: %s", client.get_address());