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: MbedSmartRestMain MbedSmartRestMain
Fork of MbedSmartRest by
Revision 26:9c36af176d91, committed 2015-08-10
- Comitter:
- xinlei
- Date:
- Mon Aug 10 10:39:53 2015 +0000
- Parent:
- 25:b8a080f5e578
- Commit message:
- removed traffic accounting
Changed in this revision
--- a/MbedClient.cpp Mon Jun 01 12:56:26 2015 +0000
+++ b/MbedClient.cpp Mon Aug 10 10:39:53 2015 +0000
@@ -184,7 +184,6 @@
void MbedClient::stop()
{
- aInfo("\033[32mMbed:\033[39m %zu bytes sent.\n", packetSize);
_isStreamRequest = false;
_sock.close();
_source.reset();
--- a/MbedDataSink.cpp Mon Jun 01 12:56:26 2015 +0000
+++ b/MbedDataSink.cpp Mon Aug 10 10:39:53 2015 +0000
@@ -33,7 +33,6 @@
#include "MbedClient.h"
#include "logging.h"
-size_t packetSize = 0;
MbedDataSink::MbedDataSink(TCPSocketConnection& sock) : _sock(sock), _len(0)
{
@@ -51,7 +50,6 @@
}
_buf[_len++] = c;
- ++packetSize;
return 1;
}
@@ -74,7 +72,6 @@
_len += len;
sent += len;
}
- packetSize += length;
return length;
}
@@ -86,8 +83,7 @@
size_t MbedDataSink::write(unsigned long number)
{
char str[24];
-
- packetSize += snprintf(str, 24, "%lu", number);
+ snprintf(str, 24, "%lu", number);
return write(str);
}
--- a/MbedDataSink.h Mon Jun 01 12:56:26 2015 +0000
+++ b/MbedDataSink.h Mon Aug 10 10:39:53 2015 +0000
@@ -36,7 +36,6 @@
#define MBED_SINK_BUFFER_SIZE 600
class MbedClient;
-extern size_t packetSize;
class MbedDataSink : public AbstractDataSink
{
