Own fork of MbedSmartRest
Dependents: MbedSmartRestMain MbedSmartRestMain
Fork of MbedSmartRest by
Diff: SmartRest.cpp
- Revision:
- 6:cd7ba1ddb664
- Parent:
- 5:2b74510900da
- Child:
- 7:8159a2d12e4e
--- a/SmartRest.cpp Thu Jul 10 16:20:31 2014 +0200 +++ b/SmartRest.cpp Mon Jul 28 12:11:02 2014 +0200 @@ -62,7 +62,7 @@ { uint8_t res; - if (!aggregator.isManaged()) + if (!aggregator.managed()) return SMARTREST_INTERNAL_ERROR; res = send(generator, overrideIdentifier); @@ -72,8 +72,10 @@ } ParsedRecord recvd; - while ((res = receive(recvd)) == SMARTREST_SUCCESS) - aggregator.add(recvd); + while ((res = receive(recvd)) == SMARTREST_SUCCESS) { + if (!aggregator.add(recvd)) + return SMARTREST_INTERNAL_ERROR; + } stop(); if (res == SMARTREST_END_OF_RESPONSE)