From: Andre Date: Sat, 29 Apr 2006 23:34:43 +0000 (+0200) Subject: add a notice message if the expected pattern was not received X-Git-Tag: v0.2.12~23 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=b3c2f654796cfc9c96f7c784fbdeebdef6f7928e;p=paraslash.git add a notice message if the expected pattern was not received --- diff --git a/net.c b/net.c index 5af967b9..0aaa428d 100644 --- a/net.c +++ b/net.c @@ -508,11 +508,12 @@ int recv_pattern(int fd, const char *pattern, size_t bufsize) if (n < len) goto out; - buf[n] = '\0'; if (strncasecmp(buf, pattern, len)) goto out; ret = 1; out: free(buf); + if (ret < 0) + PARA_NOTICE_LOG("did not receive pattern '%s'\n", buf); return ret; }