couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject svn commit: r980265 - /couchdb/trunk/src/couchdb/couch_rep_changes_feed.erl
Date Wed, 28 Jul 2010 23:28:26 GMT
Author: kocolosk
Date: Wed Jul 28 23:28:26 2010
New Revision: 980265

URL: http://svn.apache.org/viewvc?rev=980265&view=rev
Log:
don't require integer seqnums in the changes feed, COUCHDB-838

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

Modified: couchdb/trunk/src/couchdb/couch_rep_changes_feed.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_rep_changes_feed.erl?rev=980265&r1=980264&r2=980265&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_rep_changes_feed.erl (original)
+++ couchdb/trunk/src/couchdb/couch_rep_changes_feed.erl Wed Jul 28 23:28:26 2010
@@ -273,12 +273,10 @@ handle_messages([], State) ->
     {noreply, State};
 handle_messages([<<"{\"results\":[">>|Rest], State) ->
     handle_messages(Rest, State);
-handle_messages([<<"]">>, <<"\"last_seq\":", LastSeqStr/binary>>],
State) ->
-    LastSeq = list_to_integer(?b2l(hd(re:split(LastSeqStr, "}")))),
-    handle_feed_completion(State#state{last_seq = LastSeq});
-handle_messages([<<"{\"last_seq\":", LastSeqStr/binary>>], State) ->
-    LastSeq = list_to_integer(?b2l(hd(re:split(LastSeqStr, "}")))),
-    handle_feed_completion(State#state{last_seq = LastSeq});
+handle_messages([<<"]">>, <<"\"last_seq\":", _/binary>>], State)
->
+    handle_feed_completion(State);
+handle_messages([<<"{\"last_seq\":", _/binary>>], State) ->
+    handle_feed_completion(State);
 handle_messages([Chunk|Rest], State) ->
     #state{
         count = Count,



Mime
View raw message