pespin submitted this change.
osmux: assert no batch factor greater than 8 is used
Change-Id: Ie17a8174bc220d091cb7ff880363d22179b4f621
---
M src/osmux.c
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/osmux.c b/src/osmux.c
index 2a5dcc9..9ac0a7e 100644
--- a/src/osmux.c
+++ b/src/osmux.c
@@ -318,7 +318,8 @@
/* Validate amount of messages per batch. The counter field of the
* osmux header is just 3 bits long, so make sure it doesn't overflow.
*/
- if (circuit->nmsgs >= batch_factor || circuit->nmsgs >= 8) {
+ OSMO_ASSERT(batch_factor <= 8);
+ if (circuit->nmsgs >= batch_factor) {
struct rtp_hdr *rtph;
rtph = osmo_rtp_get_hdr(msg);
To view, visit change 29502. To unsubscribe, or for help writing mail filters, visit settings.