if (notit->cur_exp_packet_total_size == -1) {
if (notit->cur_exp_packet_content_size != -1) {
- BT_LOGW("Content size is set, but packet size is not: "
- "notit-addr=%p, packet-context-field-addr=%p, "
- "packet-size=%" PRId64 ", content-size=%" PRId64,
- notit, notit->dscopes.stream_packet_context,
- notit->cur_exp_packet_total_size,
- notit->cur_exp_packet_content_size);
- status = BT_MSG_ITER_STATUS_ERROR;
- goto end;
+ notit->cur_exp_packet_total_size =
+ notit->cur_exp_packet_content_size;
}
} else {
if (notit->cur_exp_packet_content_size == -1) {
}
}
+ BT_ASSERT(notit->cur_exp_packet_total_size != -1);
+ BT_ASSERT(notit->cur_exp_packet_content_size != -1);
+
if (notit->cur_exp_packet_content_size >
notit->cur_exp_packet_total_size) {
BT_LOGW("Invalid packet or content size: "
ret = set_current_packet_content_sizes(notit);
if (ret) {
status = BT_MSG_ITER_STATUS_ERROR;
- goto end;
}
return status;