Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D423217907 for ; Wed, 4 Feb 2015 15:49:38 +0000 (UTC) Received: (qmail 77152 invoked by uid 500); 4 Feb 2015 15:49:39 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 77036 invoked by uid 500); 4 Feb 2015 15:49:39 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 76988 invoked by uid 99); 4 Feb 2015 15:49:39 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2015 15:49:39 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9277AE03EB; Wed, 4 Feb 2015 15:49:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kxepal@apache.org To: commits@couchdb.apache.org Date: Wed, 04 Feb 2015 15:49:40 -0000 Message-Id: <4c40a458884c4df59d3b9b25efbb8eff@git.apache.org> In-Reply-To: <522a27744b5945babe14e806bab8647c@git.apache.org> References: <522a27744b5945babe14e806bab8647c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/4] couch-replicator commit: updated refs/heads/master to b1c2cc0 config:get/3 is more strict now The config:get/3 supports only following types for default argument - atom `undefined` - string (list) - boolean - float - integer COUCDB-2561 Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/commit/cbb3593a Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/cbb3593a Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/cbb3593a Branch: refs/heads/master Commit: cbb3593acd1722f293c7df756c575abda26afb96 Parents: 5007234 Author: ILYA Khlopotov Authored: Thu Jan 29 13:46:29 2015 -0800 Committer: ILYA Khlopotov Committed: Wed Feb 4 06:09:50 2015 -0800 ---------------------------------------------------------------------- src/couch_replicator_utils.erl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/cbb3593a/src/couch_replicator_utils.erl ---------------------------------------------------------------------- diff --git a/src/couch_replicator_utils.erl b/src/couch_replicator_utils.erl index 30afb39..ce73d90 100644 --- a/src/couch_replicator_utils.erl +++ b/src/couch_replicator_utils.erl @@ -345,14 +345,14 @@ ssl_params(Url) -> config:get("replicator", "ssl_certificate_max_depth", "3") ), VerifyCerts = config:get("replicator", "verify_ssl_certificates"), - CertFile = config:get("replicator", "cert_file", nil), - KeyFile = config:get("replicator", "key_file", nil), - Password = config:get("replicator", "password", nil), + CertFile = config:get("replicator", "cert_file", undefined), + KeyFile = config:get("replicator", "key_file", undefined), + Password = config:get("replicator", "password", undefined), SslOpts = [{depth, Depth} | ssl_verify_options(VerifyCerts =:= "true")], - SslOpts1 = case CertFile /= nil andalso KeyFile /= nil of + SslOpts1 = case CertFile /= undefined andalso KeyFile /= undefined of true -> case Password of - nil -> + undefined -> [{certfile, CertFile}, {keyfile, KeyFile}] ++ SslOpts; _ -> [{certfile, CertFile}, {keyfile, KeyFile},