Changeset: f65c0c865e47 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f65c0c865e47 Modified Files: tools/merovingian/utils/control.c Branch: Jan2014 Log Message:
Use correct comparison for recognizing error. If the first call to recv returns 2 as expected, but the second call returns 0 or -1, we also want to flag an error. diffs (12 lines): diff --git a/tools/merovingian/utils/control.c b/tools/merovingian/utils/control.c --- a/tools/merovingian/utils/control.c +++ b/tools/merovingian/utils/control.c @@ -113,7 +113,7 @@ char* control_send( if (len == 2) len += recv(sock, rbuf + len, sizeof(rbuf) - len, 0); /* perform login ritual */ - if (len <= 0) { + if (len <= 2) { snprintf(sbuf, sizeof(sbuf), "no response from monetdbd"); close(sock); return(strdup(sbuf)); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list