diff options
author | Christopher Lenz <cmlenz@apache.org> | 2008-08-31 09:43:41 +0000 |
---|---|---|
committer | Christopher Lenz <cmlenz@apache.org> | 2008-08-31 09:43:41 +0000 |
commit | 15a175144d83d6177e9bbb923a7f7157e5ea8917 (patch) | |
tree | 92b7becc9610c46f87ddf7ab4c313642b007c4aa /src/couchdb/couch_db_update_notifier.erl | |
parent | ac4075a7987dc43aadeb18a94e07f090d1b77546 (diff) |
Merged json_term_changes branch back into trunk.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@690668 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_db_update_notifier.erl')
-rw-r--r-- | src/couchdb/couch_db_update_notifier.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/couchdb/couch_db_update_notifier.erl b/src/couchdb/couch_db_update_notifier.erl index f944264c..449da356 100644 --- a/src/couchdb/couch_db_update_notifier.erl +++ b/src/couchdb/couch_db_update_notifier.erl @@ -25,6 +25,8 @@ -export([start_link/1, notify/1]). -export([init/1, terminate/2, handle_event/2, handle_call/2, handle_info/2, code_change/3,stop/1]). +-include("couch_db.hrl"). + start_link(Exec) -> couch_event_sup:start_link(couch_db_update, {couch_db_update_notifier, make_ref()}, Exec). @@ -50,8 +52,8 @@ handle_event(Event, {Fun, FunAcc}) -> FunAcc2 = Fun(Event, FunAcc), {ok, {Fun, FunAcc2}}; handle_event({EventAtom, DbName}, Port) -> - Obj = {obj, [{type, atom_to_list(EventAtom)}, {db, DbName}]}, - true = port_command(Port, cjson:encode(Obj) ++ "\n"), + Obj = {[{type, atom_to_list(EventAtom)}, {db, DbName}]}, + true = port_command(Port, ?JSON_ENCODE(Obj) ++ "\n"), {ok, Port}. handle_call(_Request, State) -> |