add a notice message if the expected pattern was not received
authorAndre <maan@p133.(none)>
Sat, 29 Apr 2006 23:34:43 +0000 (01:34 +0200)
committerAndre <maan@p133.(none)>
Sat, 29 Apr 2006 23:34:43 +0000 (01:34 +0200)
net.c

diff --git a/net.c b/net.c
index 5af967b..0aaa428 100644 (file)
--- 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;
 }