From 3d69ea6494beb0f40d7bc5830854dfed51afd555 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 11 Sep 2024 07:41:00 +0000 Subject: [PATCH 1/2] Fix uninit Handler and Closure in `z_pull` --- examples/z_pull.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/z_pull.c b/examples/z_pull.c index 722b67f12..03edcca18 100644 --- a/examples/z_pull.c +++ b/examples/z_pull.c @@ -48,8 +48,9 @@ int main(int argc, char** argv) { exit(-1); } - z_owned_ring_handler_sample_t handler; z_owned_closure_sample_t closure; + z_owned_ring_handler_sample_t handler; + z_ring_channel_sample_new(&closure, &handler, 256); printf("Declaring Subscriber on '%s'...\n", args.keyexpr); z_view_keyexpr_t ke; From 708bbfe8997b1b58664d33f8c0a1573a284b66e6 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 11 Sep 2024 11:01:21 +0000 Subject: [PATCH 2/2] Set ring channel size to `3` --- examples/z_pull.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/z_pull.c b/examples/z_pull.c index 03edcca18..40930f363 100644 --- a/examples/z_pull.c +++ b/examples/z_pull.c @@ -50,7 +50,7 @@ int main(int argc, char** argv) { z_owned_closure_sample_t closure; z_owned_ring_handler_sample_t handler; - z_ring_channel_sample_new(&closure, &handler, 256); + z_ring_channel_sample_new(&closure, &handler, 3); printf("Declaring Subscriber on '%s'...\n", args.keyexpr); z_view_keyexpr_t ke;