diff --git a/iiod-client.c b/iiod-client.c index ccf05093d..6dcbb92ad 100644 --- a/iiod-client.c +++ b/iiod-client.c @@ -510,7 +510,6 @@ static ssize_t iiod_client_read_attr_new(struct iiod_client *client, char *dest, size_t len) { struct iiod_io *io = iiod_responder_get_default_io(client->responder); - // printf("* thread = %u, iiod_responder_get_default_io = %d\n", pthread_self(), io); const struct iio_channel *chn; const struct iio_device *dev; const struct iio_buffer *buf; @@ -1605,9 +1604,7 @@ void iiod_client_free_block(struct iio_block_pdata *block) /* Cancel any I/O going on. This means we must send the block free * command through the main I/O as the block's I/O stream is * disrupted. */ - printf("thread = %u, iiod_io_cancel...\n", pthread_self()); iiod_io_cancel(block->io); - printf("thread = %u, iiod_io_cancel ok\n", pthread_self()); iiod_io_unref(block->io); io = iiod_responder_get_default_io(client->responder); diff --git a/iiod-responder.c b/iiod-responder.c index be1bfc791..54772f11b 100644 --- a/iiod-responder.c +++ b/iiod-responder.c @@ -70,7 +70,7 @@ struct iiod_responder { const struct iiod_responder_ops *ops; void *d; - struct iiod_io *readers, *writers, *default_io; + struct iiod_io *readers, *writers; struct iiod_io* default_io_pool[MAX_DEFAULT_IO_ELEMENTS]; uint64_t default_io_pool_thread_ids[MAX_DEFAULT_IO_ELEMENTS]; unsigned int default_io_pool_size; @@ -168,9 +168,8 @@ static ssize_t iiod_rw_all(struct iiod_responder *priv, nb = 1; } - if (is_read) { + if (is_read) ret = priv->ops->read(priv->d, curr, nb); - } else ret = priv->ops->write(priv->d, curr, nb); if (ret <= 0) @@ -294,7 +293,6 @@ static int iiod_responder_reader_worker(struct iiod_responder *priv) ret = iiod_run_command(priv, &cmd); iio_mutex_lock(priv->lock); - if (ret < 0) break; @@ -315,7 +313,6 @@ static int iiod_responder_reader_worker(struct iiod_responder *priv) iio_mutex_unlock(priv->lock); iiod_discard_data(priv, cmd.code); iio_mutex_lock(priv->lock); - continue; } @@ -681,8 +678,7 @@ iiod_responder_create_io(struct iiod_responder *priv, uint16_t id) void iiod_responder_set_timeout(struct iiod_responder *priv, unsigned int timeout_ms) { - // priv->timeout_ms = timeout_ms; - // priv->default_io->timeout_ms = timeout_ms; + priv->timeout_ms = timeout_ms; } void