Mercurial > hg > freeDiameter
changeset 1385:4968bc47a1a5
fd_fifo_getstats: it is not an error if a queue does not exist
This happens e.g. when peers disappear or during shutdown.
author | Thomas Klausner <tk@giga.or.at> |
---|---|
date | Mon, 22 Jul 2019 14:12:44 +0200 |
parents | 2131d6bdf32a |
children | 6e4737d332e7 |
files | libfdproto/fifo.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libfdproto/fifo.c Fri Jul 19 11:43:26 2019 +0200 +++ b/libfdproto/fifo.c Mon Jul 22 14:12:44 2019 +0200 @@ -293,6 +293,11 @@ { TRACE_ENTRY( "%p %p %p %p %p %p %p %p", queue, current_count, limit_count, highest_count, total_count, total, blocking, last); + if (queue == NULL) { + /* It is not an error if the queue is not available; happens e.g. when peers disappear */ + return 0; + } + /* Check the parameters */ CHECK_PARAMS( CHECK_FIFO( queue ) );