Changeset: b86c8c98aac7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b86c8c98aac7
Modified Files:
common/stream/tls_stream.c
Branch: smapi
Log Message:
Fix return values for tls_write and tls_read
diffs (25 lines):
diff --git a/common/stream/tls_stream.c b/common/stream/tls_stream.c
--- a/common/stream/tls_stream.c
+++ b/common/stream/tls_stream.c
@@ -71,7 +71,7 @@ tls_write(stream *restrict s, const void
}
fprintf(stderr, "SSL stream write wrote %zd bytes\n", ret);
- return 1;
+ return ret/elmsize;
}
static ssize_t
@@ -91,8 +91,10 @@ tls_read(stream *restrict s, void *restr
fprintf(stderr, "SSL stream read got %zd bytes\n", ret);
-
- return ret > 0;
+ if (ret == 0) {
+ s->eof = true;
+ }
+ return ret/elmsize;
}
static void
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]