Skip to content

Commit

Permalink
iiod: access IIO devices via API accessors
Browse files Browse the repository at this point in the history
The intent is to hide the context object inside 'context.c' for better
modularity of the library.

Signed-off-by: Alexandru Ardelean <[email protected]>
  • Loading branch information
commodo committed Oct 9, 2020
1 parent e986fcd commit 21e018c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions iiod/ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1422,8 +1422,8 @@ void interpreter(struct iio_context *ctx, int fd_in, int fd_out, bool verbose,
yylex_destroy(scanner);

/* Close all opened devices */
for (i = 0; i < ctx->nb_devices; i++)
close_dev_helper(&pdata, ctx->devices[i]);
for (i = 0; i < iio_context_get_devices_count(ctx); i++)
close_dev_helper(&pdata, iio_context_get_device(ctx, i));

#if WITH_AIO
if (use_aio) {
Expand Down

0 comments on commit 21e018c

Please sign in to comment.