From 74e55fcdb8030a39a604cde700bfb85dbbb82474 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Wed, 21 Oct 2009 15:22:19 +0000 Subject: [PATCH] Forbid enabling use_ssl=1 in configuration file if SSL is not compiled in --- src/configfile.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/configfile.c b/src/configfile.c index 06c979d..f2e5a2b 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -216,10 +216,16 @@ ParseConfigurationFile( FILE *file ) wmnotify_infos.use_ssl = false; } else if( number == 1 ) { +#if HAVE_SSL wmnotify_infos.use_ssl = true; +#else + fprintf( stderr, "%s error: You must compile %s with SSL support to\n" \ + "set parameter 'use_ssl' to true in configuration file\n", PACKAGE, PACKAGE ); + exit( EXIT_FAILURE ); +#endif } else { - fprintf( stderr, "%s: Invalid value for for parameter 'enablebeep' in\n" \ + fprintf( stderr, "%s: Invalid value for for parameter 'use_ssl' in\n" \ "configuration file (must be 0 or 1): %d\n", PACKAGE, number ); exit( EXIT_FAILURE ); } -- 2.20.1