File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 11name =thinger.io
2- version =2.5.8
2+ version =2.5.9
33author =Alvaro Luis Bustamante <
[email protected] >
44maintainer =Thinger.io <
[email protected] >
55sentence =Arduino library for the Thinger.io Internet of Things Platform.
Original file line number Diff line number Diff line change @@ -38,9 +38,9 @@ class pson_spiffs_decoder : public protoson::pson_decoder{
3838
3939protected:
4040 virtual bool read (void * buffer, size_t size){
41- file_.readBytes ((char *)buffer, size);
42- protoson::pson_decoder::read (buffer, size );
43- return true ;
41+ size_t read = file_.readBytes ((char *)buffer, size);
42+ protoson::pson_decoder::read (buffer, read );
43+ return read == size ;
4444 }
4545
4646private:
@@ -54,9 +54,10 @@ class pson_spiffs_encoder : public protoson::pson_encoder{
5454 }
5555
5656protected:
57- virtual void write (const void * buffer, size_t size){
58- file_.write ((const uint8_t *)buffer, size);
59- protoson::pson_encoder::write (buffer, size);
57+ virtual bool write (const void * buffer, size_t size){
58+ size_t wrote = file_.write ((const uint8_t *)buffer, size);
59+ protoson::pson_encoder::write (buffer, wrote);
60+ return wrote == size;
6061 }
6162
6263private:
You can’t perform that action at this time.
0 commit comments