Patch Set 2:
(5 comments)
Okay, we can go through that code in terms of reliability. But you seem to fix it. The timer question is not that important.
https://gerrit.osmocom.org/#/c/120/2/src/osmux.c File src/osmux.c:
PS2, Line 234: batch so what if nmsgs == 0? Will we need to stop the batch timer? What if the batch timer fires and there is no single msgb? Did you review the code in that regard?
Line 325: uint32_t batch_size, uint32_t batch_factor) How does it use the batch_factor? We seem to consume everything? Besides for the dummy handling? Does it mean we put dummy + data into the same message?
Line 337: return NULL; the caller will crash if that happens
PS2, Line 369: Leaks the batch_msg. And discards other frames.. already formatted into the patch.. The caller will crash.
Line 399: h->stats.output_osmux_bytes += batch_msg->len; Unconditional access of batch_msg that might be NULL