|
@@ -392,7 +392,7 @@ shellmatta_retCode_t shellmatta_processData(shellmatta_handle_t handle,
|
|
{
|
|
{
|
|
// TODO: Move this into shellmatta_transport.c
|
|
// TODO: Move this into shellmatta_transport.c
|
|
/* use headerCounter to watch how many header fields have been worked on */
|
|
/* use headerCounter to watch how many header fields have been worked on */
|
|
- uint8_t headerCounter = 0;
|
|
|
|
|
|
+ uint8_t headerCounter = 0u;
|
|
while ( (size > headerCounter)
|
|
while ( (size > headerCounter)
|
|
|| ( (true == transportLayerInst.mandatory)
|
|
|| ( (true == transportLayerInst.mandatory)
|
|
&& (size > headerCounter))
|
|
&& (size > headerCounter))
|
|
@@ -413,7 +413,7 @@ shellmatta_retCode_t shellmatta_processData(shellmatta_handle_t handle,
|
|
break;
|
|
break;
|
|
|
|
|
|
case STATE_GET_PAYLOAD_LENGTH:
|
|
case STATE_GET_PAYLOAD_LENGTH:
|
|
- payloadLength = data[headerCounter];
|
|
|
|
|
|
+ payloadLength = (uint8_t)data[headerCounter];
|
|
break;
|
|
break;
|
|
|
|
|
|
case STATE_GET_SOURCE:
|
|
case STATE_GET_SOURCE:
|
|
@@ -462,6 +462,7 @@ shellmatta_retCode_t shellmatta_processData(shellmatta_handle_t handle,
|
|
|
|
|
|
headerCounter++;
|
|
headerCounter++;
|
|
|
|
|
|
|
|
+ /* processes payload by forwarding it recursively without transport layer to processData() */
|
|
if (transportLayerInst.state == STATE_PROCESS_PAYLOAD)
|
|
if (transportLayerInst.state == STATE_PROCESS_PAYLOAD)
|
|
{
|
|
{
|
|
/* replace inst->write function pointer with transport layer write function */
|
|
/* replace inst->write function pointer with transport layer write function */
|