From commits-return-6489-apmail-couchdb-commits-archive=couchdb.apache.org@couchdb.apache.org Tue May 31 20:28:34 2011 Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A889B4F37 for ; Tue, 31 May 2011 20:28:34 +0000 (UTC) Received: (qmail 25089 invoked by uid 500); 31 May 2011 20:28:34 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 25037 invoked by uid 500); 31 May 2011 20:28:34 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 25030 invoked by uid 99); 31 May 2011 20:28:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 May 2011 20:28:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 May 2011 20:28:32 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8B7B5238896F; Tue, 31 May 2011 20:28:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1129904 - /couchdb/trunk/src/couchdb/couch_api_wrap.erl Date: Tue, 31 May 2011 20:28:11 -0000 To: commits@couchdb.apache.org From: fdmanana@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110531202811.8B7B5238896F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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, _} ->