|
@@ -652,6 +652,17 @@ bool ecall_message(nodenum_t node_num, uint32_t message_len)
|
|
nodest.in_msg_offset = 0;
|
|
nodest.in_msg_offset = 0;
|
|
nodest.in_msg_plaintext_processed = 0;
|
|
nodest.in_msg_plaintext_processed = 0;
|
|
nodest.in_msg_buf = buf;
|
|
nodest.in_msg_buf = buf;
|
|
|
|
+ // Just in case message_len == 0
|
|
|
|
+ if (nodest.in_msg_offset == nodest.in_msg_size) {
|
|
|
|
+ // This was the last chunk; handle the received message
|
|
|
|
+ uint32_t plaintext_processed = nodest.in_msg_plaintext_processed;
|
|
|
|
+ uint32_t msg_size = nodest.in_msg_size;
|
|
|
|
+ nodest.in_msg_buf = NULL;
|
|
|
|
+ nodest.in_msg_size = 0;
|
|
|
|
+ nodest.in_msg_offset = 0;
|
|
|
|
+ nodest.in_msg_plaintext_processed = 0;
|
|
|
|
+ nodest.in_msg_received(nodest, buf, plaintext_processed, msg_size);
|
|
|
|
+ }
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|