Merge pull request #645 from manuelluis/mlsr/java-fix_cdtime
[collectd.git] / src / curl_json.c
index 35461d3..a9db925 100644 (file)
@@ -612,11 +612,11 @@ static int cj_init_curl (cj_t *db) /* {{{ */
     curl_easy_setopt (db->curl, CURLOPT_USERPWD, db->credentials);
     
     if (db->digest)
-       {
-         curl_easy_setopt (db->curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
-         curl_easy_setopt (db->curl, CURLOPT_USERNAME, db->user);
-         curl_easy_setopt (db->curl, CURLOPT_PASSWORD, db->pass);
-       }
+    {
+      curl_easy_setopt (db->curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
+      curl_easy_setopt (db->curl, CURLOPT_USERNAME, db->user);
+      curl_easy_setopt (db->curl, CURLOPT_PASSWORD, db->pass);
+    }
   }
 
   curl_easy_setopt (db->curl, CURLOPT_SSL_VERIFYPEER, (long) db->verify_peer);
@@ -684,7 +684,7 @@ static int cj_config_add_url (oconfig_item_t *ci) /* {{{ */
     else if (db->url && strcasecmp ("Password", child->key) == 0)
       status = cf_util_get_string (child, &db->pass);
     else if (strcasecmp ("Digest", child->key) == 0)
-         status = cf_util_get_boolean (child, &db->digest);
+      status = cf_util_get_boolean (child, &db->digest);
     else if (db->url && strcasecmp ("VerifyPeer", child->key) == 0)
       status = cf_util_get_boolean (child, &db->verify_peer);
     else if (db->url && strcasecmp ("VerifyHost", child->key) == 0)