summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-04-27 10:04:47 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-04-27 10:04:47 +0200
commit051754ef51343c67ba817fb21ac8b02603462558 (patch)
tree912261cbea90e05462715e38c8de97e561ced2ec
parentd4bcf9901f2f45b20bdd23e17b154ebaf7edd1bc (diff)
downloadmonitoring-plugins-051754ef51343c67ba817fb21ac8b02603462558.tar.gz
fixed setting host_name or server_address in curl URL option
-rw-r--r--plugins/check_curl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index e26d8d3f..cd00b0e3 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -325,7 +325,7 @@ check_http (void)
325 325
326 /* compose URL */ 326 /* compose URL */
327 snprintf (url, DEFAULT_BUFFER_SIZE, "%s://%s%s", use_ssl ? "https" : "http", 327 snprintf (url, DEFAULT_BUFFER_SIZE, "%s://%s%s", use_ssl ? "https" : "http",
328 host_name, server_url); 328 host_name ? host_name : server_address, server_url);
329 handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_URL, url), "CURLOPT_URL"); 329 handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_URL, url), "CURLOPT_URL");
330 330
331 /* set port */ 331 /* set port */