Own fork of MbedSmartRest
Dependents: MbedSmartRestMain MbedSmartRestMain
Fork of MbedSmartRest by
Diff: SmartRest.cpp
- Revision:
- 21:207549b3711e
- Parent:
- 20:505d29d5bdfc
- Child:
- 24:11fd6fd14c28
--- a/SmartRest.cpp Mon Apr 13 14:24:44 2015 +0000 +++ b/SmartRest.cpp Mon Apr 20 15:03:44 2015 +0000 @@ -26,21 +26,11 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include <stdlib.h> #include <string.h> -#include <stdio.h> -#include "rtos.h" #include "SmartRest.h" #include "SmartRestConf.h" /*-------------------------------------------------------------------------*/ -SmartRest::SmartRest(AbstractClient& client) : - _client(client) -{ - _source = NULL; - _mogid[0] = 0; -} -/*-------------------------------------------------------------------------*/ #ifdef SMARTREST_TRANSACTIONAL /*-------------------------------------------------------------------------*/ uint8_t SmartRest::request(const DataGenerator& generator, const char *overrideIdentifier) @@ -93,8 +83,9 @@ } stop(); - if (setMoGid(record)) + if (setMoGid(record)) { return SMARTREST_SUCCESS; + } if (record.value(0).integerValue() != 40) return SMARTREST_INTERNAL_ERROR; @@ -109,8 +100,8 @@ if (!setMoGid(record)) return SMARTREST_INTERNAL_ERROR; - - return SMARTREST_SUCCESS; + else + return SMARTREST_SUCCESS; } /*-------------------------------------------------------------------------*/ uint8_t SmartRest::send(const DataGenerator& generator, const char *overrideIdentifier)