@@ -104,7 +104,7 @@ OTACloudProcessInterface::State OTADefaultCloudProcessInterface::fetch() {
104
104
continue ;
105
105
}
106
106
107
- http_res = http_client->read (context->buffer , context->buf_len );
107
+ http_res = http_client->read (context->buffer , context->bufLen );
108
108
109
109
if (http_res < 0 ) {
110
110
DEBUG_VERBOSE (" OTA ERROR: Download read error %d" , http_res);
@@ -153,13 +153,13 @@ OTACloudProcessInterface::State OTADefaultCloudProcessInterface::fetch() {
153
153
return res;
154
154
}
155
155
156
- void OTADefaultCloudProcessInterface::parseOta (uint8_t * buffer, size_t buf_len ) {
156
+ void OTADefaultCloudProcessInterface::parseOta (uint8_t * buffer, size_t bufLen ) {
157
157
assert (context != nullptr ); // This should never fail
158
158
159
- for (uint8_t * cursor=(uint8_t *)buffer; cursor<buffer+buf_len ; ) {
159
+ for (uint8_t * cursor=(uint8_t *)buffer; cursor<buffer+bufLen ; ) {
160
160
switch (context->downloadState ) {
161
161
case OtaDownloadHeader: {
162
- const uint32_t headerLeft = context->headerCopiedBytes + buf_len <= sizeof (context->header .buf ) ? buf_len : sizeof (context->header .buf ) - context->headerCopiedBytes ;
162
+ const uint32_t headerLeft = context->headerCopiedBytes + bufLen <= sizeof (context->header .buf ) ? bufLen : sizeof (context->header .buf ) - context->headerCopiedBytes ;
163
163
memcpy (context->header .buf +context->headerCopiedBytes , buffer, headerLeft);
164
164
cursor += headerLeft;
165
165
context->headerCopiedBytes += headerLeft;
@@ -185,7 +185,7 @@ void OTADefaultCloudProcessInterface::parseOta(uint8_t* buffer, size_t buf_len)
185
185
}
186
186
case OtaDownloadFile: {
187
187
const uint32_t contentLength = http_client->contentLength ();
188
- const uint32_t dataLeft = buf_len - (cursor-buffer);
188
+ const uint32_t dataLeft = bufLen - (cursor-buffer);
189
189
context->decoder .decompress (cursor, dataLeft); // TODO verify return value
190
190
191
191
context->calculatedCrc32 = crc_update (
0 commit comments