From b3c2f654796cfc9c96f7c784fbdeebdef6f7928e Mon Sep 17 00:00:00 2001 From: Andre Date: Sun, 30 Apr 2006 01:34:43 +0200 Subject: [PATCH] add a notice message if the expected pattern was not received --- net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.39.5