diff options
| author | Garrett D'Amore <garrett@damore.org> | 2021-12-25 17:38:14 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2021-12-25 17:38:14 -0800 |
| commit | 6237d268514e1f8aec562052954db22c4540eec3 (patch) | |
| tree | 32213ea0016ae10faee2817f414308c91d881c42 /src/sp/protocol/pipeline0 | |
| parent | 7a54bcd6fe345f35dd51eede6c5d66e8516c16ab (diff) | |
| download | nng-6237d268514e1f8aec562052954db22c4540eec3.tar.gz nng-6237d268514e1f8aec562052954db22c4540eec3.tar.bz2 nng-6237d268514e1f8aec562052954db22c4540eec3.zip | |
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.)
Diffstat (limited to 'src/sp/protocol/pipeline0')
| -rw-r--r-- | src/sp/protocol/pipeline0/push.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |
