From 6237d268514e1f8aec562052954db22c4540eec3 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 25 Dec 2021 17:38:14 -0800 Subject: Provide a tiny buf for lmq buffer by default. This allows us to make nni_lmq_init() non-failing. (Although the buffer size requested at initialization might not be granted.) --- src/sp/protocol/pipeline0/push.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sp/protocol/pipeline0') diff --git a/src/sp/protocol/pipeline0/push.c b/src/sp/protocol/pipeline0/push.c index 028104cd..99cb2da4 100644 --- a/src/sp/protocol/pipeline0/push.c +++ b/src/sp/protocol/pipeline0/push.c @@ -193,7 +193,7 @@ push0_pipe_ready(push0_pipe *p) // if message is waiting in the buffered queue // then we prefer that. - if (nni_lmq_getq(&s->wq, &m) == 0) { + if (nni_lmq_get(&s->wq, &m) == 0) { nni_aio_set_msg(&p->aio_send, m); nni_pipe_send(p->pipe, &p->aio_send); @@ -201,7 +201,7 @@ push0_pipe_ready(push0_pipe *p) nni_aio_list_remove(a); m = nni_aio_get_msg(a); l = nni_msg_len(m); - nni_lmq_putq(&s->wq, m); + nni_lmq_put(&s->wq, m); } } else if ((a = nni_list_first(&s->aq)) != NULL) { @@ -300,7 +300,7 @@ push0_sock_send(void *arg, nni_aio *aio) } // Can we maybe queue it. - if (nni_lmq_putq(&s->wq, m) == 0) { + if (nni_lmq_put(&s->wq, m) == 0) { // Yay, we can. So we're done. nni_aio_set_msg(aio, NULL); nni_aio_finish(aio, 0, l); -- cgit v1.2.3-70-g09d2