Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of libMiMic by
Diff: mbed/ModLocalFileSystem.cpp
- Revision:
- 26:1a13899a5a1c
- Parent:
- 21:f2a70f15301f
--- a/mbed/ModLocalFileSystem.cpp Mon Apr 29 08:03:14 2013 +0000
+++ b/mbed/ModLocalFileSystem.cpp Mon Apr 29 08:24:07 2013 +0000
@@ -144,7 +144,8 @@
if(!i_connection.isMethodType(Http::MT_GET)){
//nothing to do
}else{
- unsigned char c=0;
+ Timer t;
+ t.start();
for(;;){
sz=fread(buf,1,Httpd::SIZE_OF_HTTP_BUF,fp);
if(sz<1){
@@ -153,13 +154,13 @@
if(!i_connection.sendBody(buf,sz)){
break;
}
- //switch transport thread
- if(c%64==0){
+ if(t.read_ms()>500){
+ //switch transport thread
i_connection.unlockHttpd();
NyLPC_cThread_sleep(50);
i_connection.lockHttpd();
+ t.reset();
}
- c++;
}
}
}
