anchor.diff:  -include("mqtt_packets.hrl").
   
   %% API
  --export([parse_packet/1
  -    %% ,read/1, read/3, read_at_least/2, parse_string/1, parse_variable_length/1
  -    , parse_string/1, parse_variable_length/1]).
  +-export([parse_packet/1, parse_string/1, parse_variable_length/1]).
   
   
   %% ========================================================
  
positive.code:     {ok,undefined,Buffer};
  
  maybe_parse_will_details(_WillFlag = 1,WillRetain,WillQoS,Buffer) when WillQoS =< 2 ->
      {ok,WillTopic, Rest1} =  parse_string(Buffer),
      {ok,WillMessage, Rest2} =  parse_string(Rest1),
      {
          ok,
          #will_details{
  
negative.code: parse_specific_type(?PUBLISH,<<Dup:1,QoS:2,Retain:1>>,S) when QoS =< 2 ->
  
      %% validate flags - @todo: should we do that here? or in the connection process???
      case {Dup,QoS} of
          {1,0} -> throw({error,invalid_flags});
          _     -> ok
      end,
  
      %#parse_state{buffer = Rest } = S,
  