]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - net.c
add a notice message if the expected pattern was not received
[paraslash.git] / 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;
 }