Skip to content

Commit

Permalink
test_2
Browse files Browse the repository at this point in the history
  • Loading branch information
nunojsa committed Feb 5, 2025
1 parent 7381971 commit eadf98c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions iiod-responder.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <iio/iio.h>
#include <iio/iio-backend.h>
#include <iio/iio-lock.h>
#include <pthread.h>
#include <string.h>
#ifdef _WIN32
#include <Windows.h>
Expand Down Expand Up @@ -158,9 +159,11 @@ static ssize_t iiod_rw_all(struct iiod_responder *priv,
ret = priv->ops->read(priv->d, curr, nb);
else
ret = priv->ops->write(priv->d, curr, nb);
if (ret <= 0)
if (ret <= 0) {
printf("Got an error or stop event(%zd) (%lu)\n", ret,
pthread_self());
return ret;

}
while (ret && (size_t) ret >= curr->size) {
ret -= curr->size;
count += curr->size;
Expand Down
1 change: 1 addition & 0 deletions iiod/ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1593,6 +1593,7 @@ void ascii_interpreter(struct parser_pdata *pdata)
int ret;

yylex_init_extra(pdata, &scanner);
printf("ascii proto... binary=%d\n", pdata->binary);

do {
ret = yyparse(scanner);
Expand Down

0 comments on commit eadf98c

Please sign in to comment.