On Sat, Aug 08, 2015 at 09:00:30PM +0200, Holger Freyther wrote:
On 21 Jul 2015, at 16:23, pablo(a)gnumonks.org
wrote:
From: Pablo Neira Ayuso <pablo(a)soleta.eu>
Add a new field to count the number of messages in the batch that are pending
to be transformed to osmux. Use this new field to check when to enable the
osmux timer.
okay, when one counts a list one needs to be careful to have it balanced. While
having a look if it is balanced I noticed this in the original code:
static struct msgb *osmux_build_batch(struct osmux_in_handle *h)
{
…
llist_for_each_entry_safe(node, tnode, &batch->node_list, head) {
struct msgb *cur, *tmp;
int ctr = 0;
llist_for_each_entry_safe(cur, tmp, &node->list, list) {
struct rtp_hdr *rtph;
int add_osmux_hdr = 0;
#ifdef DEBUG_MSG
...
#endif
rtph = osmo_rtp_get_hdr(cur);
if (rtph == NULL)
return NULL;
When and how will this package be dropped?
If the RTP message that we received is malformed.
Although we already checked this when enqueuing the packet into the
circuit list before the transformation happens, so it should be safe
to remove the NULL check.
But let me revisit this in a follow up patch.
Patches 4-7 look good too!
Thanks Holger.