[Nagiosplug-devel] [ nagiosplug-Bugs-706851 ] check_tcp misses expect string without newline

SourceForge.net noreply at sourceforge.net
Sat May 31 21:42:20 CEST 2003


Bugs item #706851, was opened at 2003-03-20 07:15
Message generated for change (Comment added) made by kdebisschop
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=706851&group_id=29880

Category: None
Group: Release (specify)
Status: Open
Resolution: None
Priority: 5
Submitted By: Ade Rixon (aderixon)
>Assigned to: Karl DeBisschop (kdebisschop)
Summary: check_tcp misses expect string without newline

Initial Comment:
In check_tcp.c 1.13, the following lines were added
(line 261):
if (buffer[i-2] == '\r' && buffer[i-1] == '\n')
                                break;

I have a TCP service that returns a string on
connection without a trailing newline. It used to be
detected by the -e option to check_tcp. The above code
breaks this behaviour and causes check_tcp to wait
until the timeout is reached, whereupon it fails.

Can this either be configurable, or be removed?

----------------------------------------------------------------------

>Comment By: Karl DeBisschop (kdebisschop)
Date: 2003-06-01 00:27

Message:
Logged In: YES 
user_id=1671

The issue is not that the lines were added, it's that the
old version could fail if he first line of text was more
than MAXBUF char long. 

1.12 calls recv once, 1.13 calls recv until the app stops
sending. Are you trying to monitor a streaming app by chance?

I propose that the solution is to add an option for a cap on
the number of bytes that check_tcp should fetch. Will that
work for you?


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=706851&group_id=29880




More information about the Devel mailing list