From 15a175144d83d6177e9bbb923a7f7157e5ea8917 Mon Sep 17 00:00:00 2001 From: Christopher Lenz Date: Sun, 31 Aug 2008 09:43:41 +0000 Subject: 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 --- src/couchdb/couch_db_update_notifier.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/couchdb/couch_db_update_notifier.erl') 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) -> -- cgit v1.2.3