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; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34444?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ibfe51a2faf29f8ae160a9c330c9af0d09b5a9002 Gerrit-Change-Number: 34444 Gerrit-PatchSet: 4 Gerrit-Owner: arehbein <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <[email protected]> Gerrit-Reviewer: fixeria <[email protected]> Gerrit-Reviewer: pespin <[email protected]> Gerrit-Attention: fixeria <[email protected]> Gerrit-Attention: dexter <[email protected]> Gerrit-Comment-Date: Mon, 18 Sep 2023 15:56:14 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
