Repository: couchdb-global-changes
Updated Branches:
  refs/heads/master 68c6a0eb4 -> f6e4c5629


Return {ok, State} from handle_config_change/5

This is a fixup commit for COUCHDB-3102.
config_listener expects either remove_handler or {ok, State} from the
callback module.

COUCHDB-3102


Project: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/commit/e984486a
Tree: 
http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/tree/e984486a
Diff: 
http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/diff/e984486a

Branch: refs/heads/master
Commit: e984486a1ea4a35387200db61b1d7b49b01801d6
Parents: 68c6a0e
Author: ILYA Khlopotov <iil...@ca.ibm.com>
Authored: Fri Sep 2 10:19:36 2016 -0700
Committer: ILYA Khlopotov <iil...@ca.ibm.com>
Committed: Fri Sep 2 10:19:36 2016 -0700

----------------------------------------------------------------------
 src/global_changes_sup.erl | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/blob/e984486a/src/global_changes_sup.erl
----------------------------------------------------------------------
diff --git a/src/global_changes_sup.erl b/src/global_changes_sup.erl
index ff3b2e9..59a40f2 100644
--- a/src/global_changes_sup.erl
+++ b/src/global_changes_sup.erl
@@ -56,7 +56,7 @@ handle_config_change("global_changes", "max_event_delay", 
MaxDelayStr, _, _) ->
     catch error:badarg ->
         ok
     end,
-    ok;
+    {ok, nil};
 
 handle_config_change("global_changes", "max_write_delay", MaxDelayStr, _, _) ->
     try list_to_integer(MaxDelayStr) of
@@ -65,20 +65,20 @@ handle_config_change("global_changes", "max_write_delay", 
MaxDelayStr, _, _) ->
     catch error:badarg ->
         ok
     end,
-    ok;
+    {ok, nil};
 
 handle_config_change("global_changes", "update_db", "false", _, _) ->
     gen_server:cast(?LISTENER, {set_update_db, false}),
     gen_server:cast(?SERVER, {set_update_db, false}),
-    ok;
+    {ok, nil};
 
 handle_config_change("global_changes", "update_db", _, _, _) ->
     gen_server:cast(?LISTENER, {set_update_db, true}),
     gen_server:cast(?SERVER, {set_update_db, true}),
-    ok;
+    {ok, nil};
 
 handle_config_change(_, _, _, _, _) ->
-    ok.
+    {ok, nil}.
 
 handle_config_terminate(_Server, _Reason, _State) ->
     ok.

Reply via email to