anchor.diff:                  _ ->
                       ok
               end,
  -            State;
  +            {ok, State};
           _ ->
               State1 =
                   case Opcode of
  
positive.code:                     _ ->
                          State
                  end,
              case sets:is_element(VBucket, VBuckets) of
                  true ->
                      ok = prim_inet:send(Downstream, Packet),
                      State1#state{last_sent_seqno = Opaque};
                  false ->
                      %% Filter it out and count it
                      State1#state{bad_vbucket_count =
                                       State1#state.bad_vbucket_count + 1}
              end
      end.
  
negative.code:   when byte_size(Buffer) >= BodyLen + ?HEADER_LEN ->
      %% We have a complete command
      {Packet, NewBuffer} = split_binary(Buffer, BodyLen + ?HEADER_LEN),
      Result =
          case Opcode of
              ?NOOP ->
                  %% These aren't normal TAP packets; eating them here
                  %% makes everything else easier.
                  {ok, State};
              _ ->
                  CB(Packet, State)
          end,
  
      case Result of
          {ok, State1} ->
              process_data(NewBuffer, CB, State1);
          {stop, State1} ->
              {NewBuffer, State1}
      end;
  process_data(Buffer, _CB, State) ->
      %% Incomplete
      {Buffer, State}.
  