Commit 2023a23a authored by johan's avatar johan

Fix multipart body handler bug on small sized messages

parent 06c512ff
......@@ -318,13 +318,13 @@ static int belle_sip_multipart_body_handler_send_chunk(belle_sip_body_handler_t
}
*size -=offsetSize; /* decrease data length requested to the current part handler */
buffer +=offsetSize; /* increase buffer pointer to have it pointing to the begining of free space, just after header */
}
retval = belle_sip_body_handler_send_chunk(current_part, msg, buffer, size);
retval = belle_sip_body_handler_send_chunk(current_part, msg, buffer+offsetSize, size); /* add offsetSize to the buffer address in order to point at the begining of free space (after header if included) */
*size +=offsetSize; /* restore total of data given including potential separator and header */
if (retval == BELLE_SIP_CONTINUE) {
return BELLE_SIP_CONTINUE; /* there is still data to be sent, continue */
} else { /* this part has reach the end, pass to next one if there is one */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment