Mercurial > hg > freeDiameter
diff libfdproto/fifo.c @ 1393:357e9cec520f
libfdproto: add fd_fifo_set_max
This function sets the maximum size for a FIFO.
author | Thomas Klausner <tk@giga.or.at> |
---|---|
date | Fri, 15 Nov 2019 11:29:15 +0100 |
parents | 4968bc47a1a5 |
children | 3cbe458fbfa9 |
line wrap: on
line diff
--- a/libfdproto/fifo.c Fri Nov 15 11:28:11 2019 +0100 +++ b/libfdproto/fifo.c Fri Nov 15 11:29:15 2019 +0100 @@ -117,6 +117,13 @@ return 0; } +int fd_fifo_set_max (struct fifo * queue, int max) +{ + queue->max = max; + return 0; +} + + /* Dump the content of a queue */ DECLARE_FD_DUMP_PROTOTYPE(fd_fifo_dump, char * name, struct fifo * queue, fd_fifo_dump_item_cb dump_item) {