couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [2/4] couch-replicator commit: updated refs/heads/master to b1c2cc0
Date Wed, 04 Feb 2015 15:49:40 GMT
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 <iilyak@ca.ibm.com>
Authored: Thu Jan 29 13:46:29 2015 -0800
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
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},


Mime
View raw message