Skip to content

Commit

Permalink
test_5
Browse files Browse the repository at this point in the history
  • Loading branch information
nunojsa committed Feb 5, 2025
1 parent 90e3e11 commit 7e8faa6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions iiod/responder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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. */
Expand All @@ -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);
}
Expand Down

0 comments on commit 7e8faa6

Please sign in to comment.