]> git.tue.mpg.de Git - paraslash.git/commitdiff
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 5af967b99b13313565bb3ab830457c5cb607b414..0aaa428df08a49ed7cc7a60b6c050563425e5def 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;
 }