This changes an assertion in set_current_packet_content_sizes() to check
that either both the packet and content sizes are set (one can be set
from the other) or both are unset.
It's okay that both total and content sizes are unset: the data decoder
is already implemented to end the packet when the medium returns
`BT_MSG_ITER_MEDIUM_STATUS_EOF`.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
}
}
- BT_ASSERT(notit->cur_exp_packet_total_size != -1);
- BT_ASSERT(notit->cur_exp_packet_content_size != -1);
+ BT_ASSERT((notit->cur_exp_packet_total_size >= 0 &&
+ notit->cur_exp_packet_content_size >= 0) ||
+ (notit->cur_exp_packet_total_size < 0 &&
+ notit->cur_exp_packet_content_size < 0));
if (notit->cur_exp_packet_content_size >
notit->cur_exp_packet_total_size) {