From 7e8faa62ce70ae18e1581efa5cc1bb48d0c43c36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20S=C3=A1?= Date: Wed, 5 Feb 2025 14:29:55 +0000 Subject: [PATCH] test_5 --- iiod/responder.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/iiod/responder.c b/iiod/responder.c index 26a646633..f30bc642b 100644 --- a/iiod/responder.c +++ b/iiod/responder.c @@ -320,7 +320,7 @@ static int buffer_dequeue_block(void *priv, void *d) unsigned int nb_data = 0; intptr_t ret; - printf("Dequeue block\n"); + printf("Dequeue block, %u\n", entry->idx); ret = iio_block_dequeue(entry->block, false); if (ret < 0) goto out_send_response; @@ -577,6 +577,7 @@ static void handle_free_buffer(struct parser_pdata *pdata, iio_mutex_unlock(buflist_lock); IIO_DEBUG("Buffer %u freed.\n", cmd->code); + printf("Buffer %u freed.\n", cmd->code); out_send_response: iiod_io_send_response_code(io, ret); @@ -753,6 +754,7 @@ static void handle_free_block(struct parser_pdata *pdata, SLIST_REMOVE(&buf_entry->blocklist, entry, block_entry, entry); + printf("Block %u freed.\n", entry->idx); free_block_entry(entry); ret = 0; break; @@ -761,7 +763,6 @@ static void handle_free_block(struct parser_pdata *pdata, iio_mutex_unlock(buf_entry->lock); IIO_DEBUG("Block %u freed.\n", cmd->code); - out_send_response: /* We may have freed the block's iiod_io, so create a new one to * answer the request. */ @@ -770,6 +771,7 @@ static void handle_free_block(struct parser_pdata *pdata, /* TODO: How to handle the error? */ return; } + printf("Sending free block response code %d\n", ret); iiod_io_send_response_code(io, ret); iiod_io_unref(io); }