You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by fd...@apache.org on 2011/05/31 22:28:11 UTC

svn commit: r1129904 - /couchdb/trunk/src/couchdb/couch_api_wrap.erl

Author: fdmanana
Date: Tue May 31 20:28:11 2011
New Revision: 1129904

URL: http://svn.apache.org/viewvc?rev=1129904&view=rev
Log:
Re-use couch_doc:abort_multi_part_stream/1 in couch_api_wrap

This was accidently duplicated in revision 1129900.


Modified:
    couchdb/trunk/src/couchdb/couch_api_wrap.erl

Modified: couchdb/trunk/src/couchdb/couch_api_wrap.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_api_wrap.erl?rev=1129904&r1=1129903&r2=1129904&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_api_wrap.erl (original)
+++ couchdb/trunk/src/couchdb/couch_api_wrap.erl Tue May 31 20:28:11 2011
@@ -480,7 +480,7 @@ receive_docs(Streamer, UserFun, UserAcc)
                 {ok, UserAcc2} ->
                     ok;
                 {skip, UserAcc2} ->
-                    skip_multipart_atts(Parser)
+                    couch_doc:abort_multi_part_stream(Parser)
                 end,
                 receive_docs(Streamer, UserFun, UserAcc2)
             end;
@@ -501,24 +501,6 @@ receive_docs(Streamer, UserFun, UserAcc)
     end.
 
 
-skip_multipart_atts(Parser) ->
-    skip_multipart_atts(Parser, erlang:monitor(process, Parser)).
-
-skip_multipart_atts(Parser, MonRef) ->
-    case is_process_alive(Parser) of
-    true ->
-        Parser ! {get_bytes, self()},
-        receive
-        {bytes, Bytes} ->
-             skip_multipart_atts(Parser, MonRef);
-        {'DOWN', MonRef, _, _, _} ->
-             ok
-        end;
-    false ->
-        erlang:demonitor(MonRef, [flush])
-    end.
-
-
 restart_remote_open_doc_revs() ->
     receive
     {body_bytes, _} ->