Attention is currently required from: dexter, fixeria.
3 comments:
File src/core/write_queue.c:
Patch Set #4, Line 153: * \returns Number of messages dropped.
I'd return an int, so we can add error codes later on. "ssize_t" maybe, so add possibility of a bigger count.
Patch Set #4, Line 157: size_t osmo_wqueue_update_maxlen(struct osmo_wqueue *queue, size_t len)
Let's call this "osmo_wqueue_set_maxlen()".
queue->max_length is a unsigned int iirc, so why using size_t len above?
Patch Set #4, Line 165: dropped_msgs++;
No need to increment the var N times, simply:
if (queue->current_length > len)
return queue->current_length - len;
else
return 0;
To view, visit change 34444. To unsubscribe, or for help writing mail filters, visit settings.