No title Revision 303036653730 (Mon Aug 08 2011 at 19:12) - Diff Link to this snippet: https://friendpaste.com/6g6tQIIvjnBEi7a2vkIQDc Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 12345678910111213141516171819diff --git a/src/couchdb/couch_external_server.erl b/src/couchdb/couch_external_server.erlindex 045fcee..e1db2b2 100644--- a/src/couchdb/couch_external_server.erl+++ b/src/couchdb/couch_external_server.erl@@ -48,7 +48,13 @@ terminate(_Reason, {_Name, _Command, Pid}) -> ok. handle_call({execute, JsonReq}, _From, {Name, Command, Pid}) ->- {reply, couch_os_process:prompt(Pid, JsonReq), {Name, Command, Pid}}.+ Reply = case couch_os_process:prompt(Pid, JsonReq) of+ {json, Json} ->+ ?JSON_DECODE(Json);+ Else ->+ Else+ end,+ {reply, Reply, {Name, Command, Pid}}. handle_info({'EXIT', _Pid, normal}, State) -> {noreply, State};