Code

finish recv() loop when stream GT or EQ maxbytes (was GT)
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>
Mon, 2 Jun 2003 14:46:48 +0000 (14:46 +0000)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>
Mon, 2 Jun 2003 14:46:48 +0000 (14:46 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@531 f882894a-f735-0410-b71e-b25c423dba1c

plugins/check_tcp.c

index 13c34f97a81472f93475adecddca09d51641fe0d..f4fe5f40cf84da5e7e814b2b77a2ebc7677cf33b 100644 (file)
@@ -297,7 +297,7 @@ main (int argc, char **argv)
                        asprintf (&status, "%s%s", status, buffer);
                        if (buffer[i-2] == '\r' && buffer[i-1] == '\n')
                                break;
-                       if (maxbytes>0 && strlen(status)>maxbytes)
+                       if (maxbytes>0 && strlen(status)>=maxbytes)
                                break;
                }