osmux: Change order of lines to follow packet fill order

The osmux header goes before in the packet, so let's move the line
checking is size before the content.

Change-Id: I33feac834700d22ed06472d8971abd0567ce623b
This commit is contained in:
Pau Espin 2022-09-27 17:31:49 +02:00
parent 414b34e713
commit fe78dc46ed
1 changed files with 1 additions and 1 deletions

View File

@ -715,9 +715,9 @@ osmux_batch_add(struct osmux_batch *batch, uint32_t batch_factor, struct msgb *m
}
/* First check if there is room for this message in the batch */
bytes += amr_payload_len;
if (circuit->nmsgs == 0)
bytes += sizeof(struct osmux_hdr);
bytes += amr_payload_len;
/* No room, sorry. You'll have to retry */
if (bytes > batch->remaining_bytes)