Attention is currently required from: dexter, fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34444?usp=email )
Change subject: write_queue: Enable updating max_length field ......................................................................
Patch Set 4:
(3 comments)
File src/core/write_queue.c:
https://gerrit.osmocom.org/c/libosmocore/+/34444/comment/1375ee89_5241c1c9 PS4, 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.
https://gerrit.osmocom.org/c/libosmocore/+/34444/comment/d53f9bd1_38d2bfdf PS4, 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?
https://gerrit.osmocom.org/c/libosmocore/+/34444/comment/c1a4393b_6779c349 PS4, 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;