]> granicus.if.org Git - icinga2/commitdiff
Windows build fix
authorGunnar Beutner <gunnar@beutner.name>
Tue, 9 Aug 2016 13:41:27 +0000 (15:41 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 9 Aug 2016 13:41:27 +0000 (15:41 +0200)
fixes #12339

lib/remote/apilistener.cpp

index 424c63004965503c4abe4e09b48259b63528d385..51032358891a66987de94f4ef24b08011f9918eb 100644 (file)
@@ -1190,12 +1190,12 @@ void ApiListener::ValidateTlsProtocolmin(const String& value, const ValidationUt
            value != SSL_TXT_TLSV1_2
 #endif /* SSL_TXT_TLSV1_1 */
            ) {
-               BOOST_THROW_EXCEPTION(ValidationError(this, boost::assign::list_of("tls_protocolmin"), "Invalid TLS version. "
-                   "Must be one of '" SSL_TXT_TLSV1 "'"
+               String message = "Invalid TLS version. Must be one of '" SSL_TXT_TLSV1 "'";
 #ifdef SSL_TXT_TLSV1_1
-                   ", '" SSL_TXT_TLSV1_1 "' or '" SSL_TXT_TLSV1_2 "'"
+               message += ", '" SSL_TXT_TLSV1_1 "' or '" SSL_TXT_TLSV1_2 "'";
 #endif /* SSL_TXT_TLSV1_1 */
-                   ));
+
+               BOOST_THROW_EXCEPTION(ValidationError(this, boost::assign::list_of("tls_protocolmin"), message));
        }
 }