couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [couchdb] 11/15: compatibility for erlang < 20
Date Fri, 09 Nov 2018 13:51:49 GMT
This is an automated email from the ASF dual-hosted git repository.

jan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit cbbd2fad30a951971a66899ad1d184220263b976
Author: Jan Lehnardt <jan@apache.org>
AuthorDate: Sun Sep 16 16:44:21 2018 +0200

    compatibility for erlang < 20
---
 src/chttpd/test/chttpd_view_test.erl | 2 +-
 src/couch/src/couch_proc_manager.erl | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/chttpd/test/chttpd_view_test.erl b/src/chttpd/test/chttpd_view_test.erl
index 6743f31..114eb08 100644
--- a/src/chttpd/test/chttpd_view_test.erl
+++ b/src/chttpd/test/chttpd_view_test.erl
@@ -31,7 +31,7 @@ setup() ->
     TmpDb = ?tempdb(),
     Addr = config:get("chttpd", "bind_address", "127.0.0.1"),
     Port = mochiweb_socket_server:get(chttpd, port),
-    os:putenv("COUCHDB_QUERY_SERVER_JAVASCRIPT", "../../..//bin/couchjs ../../..//share/server/main.js"),
+    os:putenv("COUCHDB_QUERY_SERVER_JAVASCRIPT", "../../../bin/couchjs ../../../share/server/main.js"),
     Url = lists:concat(["http://", Addr, ":", Port, "/", ?b2l(TmpDb)]),
     create_db(Url),
     Url.
diff --git a/src/couch/src/couch_proc_manager.erl b/src/couch/src/couch_proc_manager.erl
index 4c11618..26fe5ad 100644
--- a/src/couch/src/couch_proc_manager.erl
+++ b/src/couch/src/couch_proc_manager.erl
@@ -376,7 +376,7 @@ get_env_for_spec(Spec, Target) ->
     % loop over os:getenv(), match SPEC_TARGET
     lists:filtermap(fun(VarName) ->
         SpecStr = Spec ++ Target,
-        case string:split(VarName, "=") of
+        case string:tokens(VarName, "=") of
             [SpecStr, Cmd] -> {true, Cmd};
             _Else -> false
         end
@@ -385,7 +385,7 @@ get_env_for_spec(Spec, Target) ->
 get_query_server(LangStr) ->
     % look for COUCH_QUERY_SERVER_LANGSTR in env
     % if exists, return value, else undefined
-    UpperLangString = string:uppercase(LangStr),
+    UpperLangString = string:to_upper(LangStr),
     case get_env_for_spec("COUCHDB_QUERY_SERVER_", UpperLangString) of
         [] -> undefined;
         [Command] -> Command
@@ -398,7 +398,6 @@ native_query_server_enabled() ->
     NativeLegacyConfig = config:get("native_query_servers", "erlang", ""),
     NativeLegacyEnabled = NativeLegacyConfig =:= "{couch_native_process, start_link, []}",
 
-    couch_log:error("~nNativeEnabled: ~p~n", [NativeEnabled]),
     % there surely is a more elegant way to do this that eludes me at present
     case {NativeEnabled, NativeLegacyEnabled} of
         {true, _} -> true;


Mime
View raw message