aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-02-15 13:29:18 +0100
committerChristian Grothoff <christian@grothoff.org>2017-02-15 13:29:18 +0100
commite5fd7e14da95d93568cba31aa5a756cf63505d3f (patch)
tree35656ba94fcac7ae40bfefb1262e4dc055396406
parent3b2c0e14365870933c6090d3c2537995e48b36e5 (diff)
downloadlibmicrohttpd-e5fd7e14da95d93568cba31aa5a756cf63505d3f.tar.gz
libmicrohttpd-e5fd7e14da95d93568cba31aa5a756cf63505d3f.zip
convert have_dhparams to 'bool'
-rw-r--r--src/microhttpd/daemon.c8
-rw-r--r--src/microhttpd/internal.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 993ad27c..2c976a8d 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -538,7 +538,7 @@ MHD_init_daemon_certificate (struct MHD_Daemon *daemon)
538 } 538 }
539 } 539 }
540 540
541 if (MHD_YES == daemon->have_dhparams) 541 if (daemon->have_dhparams)
542 { 542 {
543 gnutls_certificate_set_dh_params (daemon->x509_cred, 543 gnutls_certificate_set_dh_params (daemon->x509_cred,
544 daemon->https_mem_dhparams); 544 daemon->https_mem_dhparams);
@@ -4454,7 +4454,7 @@ parse_options_va (struct MHD_Daemon *daemon,
4454 gnutls_dh_params_deinit (daemon->https_mem_dhparams); 4454 gnutls_dh_params_deinit (daemon->https_mem_dhparams);
4455 return MHD_NO; 4455 return MHD_NO;
4456 } 4456 }
4457 daemon->have_dhparams = MHD_YES; 4457 daemon->have_dhparams = true;
4458 } 4458 }
4459 else 4459 else
4460 { 4460 {
@@ -5839,10 +5839,10 @@ MHD_stop_daemon (struct MHD_Daemon *daemon)
5839 5839
5840 /* TLS clean up */ 5840 /* TLS clean up */
5841#ifdef HTTPS_SUPPORT 5841#ifdef HTTPS_SUPPORT
5842 if (MHD_YES == daemon->have_dhparams) 5842 if (daemon->have_dhparams)
5843 { 5843 {
5844 gnutls_dh_params_deinit (daemon->https_mem_dhparams); 5844 gnutls_dh_params_deinit (daemon->https_mem_dhparams);
5845 daemon->have_dhparams = MHD_NO; 5845 daemon->have_dhparams = false;
5846 } 5846 }
5847 if (0 != (daemon->options & MHD_USE_TLS)) 5847 if (0 != (daemon->options & MHD_USE_TLS))
5848 { 5848 {
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index 707bfe82..48da46d3 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -1550,9 +1550,9 @@ struct MHD_Daemon
1550 gnutls_dh_params_t https_mem_dhparams; 1550 gnutls_dh_params_t https_mem_dhparams;
1551 1551
1552 /** 1552 /**
1553 * #MHD_YES if we have initialized @e https_mem_dhparams. 1553 * true if we have initialized @e https_mem_dhparams.
1554 */ 1554 */
1555 int have_dhparams; 1555 bool have_dhparams;
1556 1556
1557 /** 1557 /**
1558 * For how many connections do we have 'tls_read_ready' set to MHD_YES? 1558 * For how many connections do we have 'tls_read_ready' set to MHD_YES?