فهرست منبع

check_http: Fix compilation without SSL support

The "ssl_version" variable was undeclared when the plugins were compiled
--without-openssl and --without-gnutls.

Bug reported by Michael LaCorte on the "nagiosplug-help" mailing list
(Message-ID: <CCD30C91-A2A8-463A-82A9-F99B54F741D3@gmail.com>).
Holger Weiss 13 سال پیش
والد
کامیت
ea595f1371
1فایلهای تغییر یافته به همراه4 افزوده شده و 3 حذف شده
  1. 4 3
      plugins/check_http.c

+ 4 - 3
plugins/check_http.c

@@ -304,9 +304,7 @@ process_arguments (int argc, char **argv)
       /* Fall through to -S option */
       /* Fall through to -S option */
 #endif
 #endif
     case 'S': /* use SSL */
     case 'S': /* use SSL */
-#ifndef HAVE_SSL
-      usage4 (_("Invalid option - SSL is not available"));
-#endif
+#ifdef HAVE_SSL
       use_ssl = TRUE;
       use_ssl = TRUE;
       if (optarg == NULL || c != 'S')
       if (optarg == NULL || c != 'S')
         ssl_version = 0;
         ssl_version = 0;
@@ -317,6 +315,9 @@ process_arguments (int argc, char **argv)
       }
       }
       if (specify_port == FALSE)
       if (specify_port == FALSE)
         server_port = HTTPS_PORT;
         server_port = HTTPS_PORT;
+#else
+      usage4 (_("Invalid option - SSL is not available"));
+#endif
       break;
       break;
     case SNI_OPTION:
     case SNI_OPTION:
       use_sni = TRUE;
       use_sni = TRUE;