Changeset: 1e1cb181cf86 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1e1cb181cf86
Modified Files:
        clients/mapiclient/tomograph.c
Branch: Jun2016
Log Message:

Two consecutive 0 length reads from a stream means the end.


diffs (12 lines):

diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c
--- a/clients/mapiclient/tomograph.c
+++ b/clients/mapiclient/tomograph.c
@@ -1877,6 +1877,8 @@ main(int argc, char **argv)
                resetTomograph();
                conn = mapi_get_from(dbh);
                while ((m = mnstr_read(conn, buffer + len, 1, buflen - len-1)) 
>= 0) {
+                       if (m == 0 && (m = mnstr_read(conn, buffer + len, 1, 
buflen - len-1)) <= 0)
+                               break;
                        buffer[len + m] = 0;
                        response = buffer;
                        while ((e = strchr(response, '\n')) != NULL) {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to