| a | b | |
|---|
| 0 | + | diff --git a/src/couchdb/couch_external_server.erl b/src/couchdb/couch_external_server.erl |
|---|
| 0 | + | index 045fcee..e1db2b2 100644 |
|---|
| 0 | + | --- a/src/couchdb/couch_external_server.erl |
|---|
| 0 | + | +++ b/src/couchdb/couch_external_server.erl |
|---|
| 0 | + | @@ -48,7 +48,13 @@ terminate(_Reason, {_Name, _Command, Pid}) -> |
|---|
| 0 | + | ok. |
|---|
| 0 | + | |
|---|
| 0 | + | handle_call({execute, JsonReq}, _From, {Name, Command, Pid}) -> |
|---|
| 0 | + | - {reply, couch_os_process:prompt(Pid, JsonReq), {Name, Command, Pid}}. |
|---|
| 0 | + | + Reply = case couch_os_process:prompt(Pid, JsonReq) of |
|---|
| 0 | + | + {json, Json} -> |
|---|
| 0 | + | + ?JSON_DECODE(Json); |
|---|
| 0 | + | + Else -> |
|---|
| 0 | + | + Else |
|---|
| 0 | + | + end, |
|---|
| 0 | + | + {reply, Reply, {Name, Command, Pid}}. |
|---|
| 0 | + | |
|---|
| 0 | + | handle_info({'EXIT', _Pid, normal}, State) -> |
|---|
| 0 | + | {noreply, State}; |
|---|
| ... | |
|---|