[Nagiosplug-checkins] SF.net SVN: nagiosplug: [1891] nagiosplug/trunk/plugins/check_http.c

hweiss at users.sourceforge.net hweiss at users.sourceforge.net
Sun Jan 6 20:45:01 CET 2008


Revision: 1891
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=1891&view=rev
Author:   hweiss
Date:     2008-01-06 11:45:00 -0800 (Sun, 06 Jan 2008)

Log Message:
-----------
Remove support for specifying the port number using "-H example.com:80".
Since this didn't work anyway (because ":80" wasn't stripped from the
"host_name" after extracting the "server_port"), nobody can be using
this syntax, and it prevents "-H" from accepting IPv6 addresses
(neufeind - 1865082).  IMO, fixing it to recognize both ":80" and IPv6
addresses isn't worth it, as the ":80" syntax doesn't seem very useful
for Nagios plugins (given the way how they are usually called in Nagios
command definitions).

Modified Paths:
--------------
    nagiosplug/trunk/plugins/check_http.c

Modified: nagiosplug/trunk/plugins/check_http.c
===================================================================
--- nagiosplug/trunk/plugins/check_http.c	2008-01-06 15:44:57 UTC (rev 1890)
+++ nagiosplug/trunk/plugins/check_http.c	2008-01-06 19:45:00 UTC (rev 1891)
@@ -317,8 +317,6 @@
     /* Note: H, I, and u must be malloc'd or will fail on redirects */
     case 'H': /* Host Name (virtual host) */
       host_name = strdup (optarg);
-      if (strstr (optarg, ":"))
-        sscanf (optarg, "%*[^:]:%d", &server_port);
       break;
     case 'I': /* Server IP-address */
       server_address = strdup (optarg);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Commits mailing list