From 252ae618fc6a02ca68872a1262d054a0b7b98fdb Mon Sep 17 00:00:00 2001
From: Holger Weiss <holger@zedat.fu-berlin.de>
Date: Tue, 29 May 2012 12:59:16 +0200
Subject: check_http: Fix -C/--certificate option handling

The support for specifying the desired SSL protocol version via an
optional -S/--ssl argument broke the -C/--certificate option.  This is
fixed now.

diff --git a/plugins/check_http.c b/plugins/check_http.c
index 8712079..315848f 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -295,7 +295,7 @@ process_arguments (int argc, char **argv)
       usage4 (_("Invalid option - SSL is not available"));
 #endif
       use_ssl = TRUE;
-      if (optarg == NULL)
+      if (optarg == NULL || c != 'S')
         ssl_version = 0;
       else {
         ssl_version = atoi(optarg);
-- 
cgit v0.10-9-g596f

