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.
Dependents: RdBlindsServer SpideyWallWeb RdGasUseMonitor
Diff: RdWebServer.cpp
- Revision:
- 25:ffa1dddd3da4
- Parent:
- 24:27800de38eab
- Child:
- 26:3c4c10e989b1
--- a/RdWebServer.cpp Mon Aug 31 15:00:41 2015 +0000
+++ b/RdWebServer.cpp Mon Sep 28 10:29:45 2015 +0000
@@ -115,13 +115,16 @@
int rxLen = clientSocketConn.receive(_buffer, HTTPD_MAX_REQ_LENGTH);
if (rxLen == -1)
{
- RD_DBG("clientSocketConn.receive() returned %d", rxLen);
if (_closeConnOnReceiveFail)
{
int closeRet = clientSocketConn.close();
- RD_DBG("Failed receive connection close() ret %d is connected %d", closeRet, clientSocketConn.is_connected());
+ RD_DBG("Rx Timeout - conn close() ret %d (is_connected %d)", closeRet, clientSocketConn.is_connected());
forcedClosed = true;
}
+ else
+ {
+ RD_DBG("Rx Timeout - not closing - is_connected %d", clientSocketConn.is_connected());
+ }
continue;
}
if (rxLen == 0)
@@ -241,8 +244,11 @@
{
char combinedFileName[MAX_FILENAME_LEN];
strcpy(combinedFileName, _curCmdStr);
- strcat(combinedFileName, "/");
- strcat(combinedFileName, _curArgStr);
+ if (strlen(_curArgStr) > 0)
+ {
+ strcat(combinedFileName, "/");
+ strcat(combinedFileName, _curArgStr);
+ }
handledOk = handleSDFileRequest(combinedFileName, _curArgStr, clientSocketConn);
}
}