anchor.diff:  	 terminate/2, code_change/3]).
   
   -record(state, {should_contact_tracker = false,
  +		queued_message = none,
   		peer_master_pid = none,
   	        state_pid = none,
   	        url = none,
  
positive.code: %% Description: Handling all non call/cast messages
  %%--------------------------------------------------------------------
  handle_info(timeout, S) ->
      case contact_tracker(S, none) of
  	{ok, Body} ->
  	    {ok, NextRequestTime, NS} = decode_and_handle_body(Body, S),
  	    {noreply, NS, timer:seconds(NextRequestTime)};
  	{error, timedout} ->
  	    {noreply, S, timer:seconds(?DEFAULT_CONNECTION_TIMEOUT_INTERVAL)}
      end;
  
negative.code: %% Description: Handling cast messages
  %%--------------------------------------------------------------------
  handle_cast(start_now, S) ->
      case contact_tracker(S, "started") of
  	{ok, Body} ->
  	    {ok, NextRequestTime, NS} = decode_and_handle_body(Body, S),
  	    error_logger:info_msg("Will contact again in ~B seconds~n",
  				  [NextRequestTime]),
  	    {noreply, NS, timer:seconds(NextRequestTime)};
  	{error, etimedout} ->
  	    {noreply,
  	     S#state{queued_message = "started"},
  	     timer:seconds(?DEFAULT_CONNECTION_TIMEOUT_INTERVAL)}
      end;
  handle_cast(torrent_completed, S) ->
      case contact_tracker(S, "completed") of
  	{ok, Body} ->
  	    {ok, NextRequestTime, NS} = decode_and_handle_body(Body, S),
  	    error_logger:info_msg("Will contact again in ~B seconds~n",
  				  [NextRequestTime]),
  	    {noreply, NS, timer:seconds(NextRequestTime)};
  	{error, etimedout} ->
  	    {noreply,
  	     S#state{queued_message = "completed"},
  	     timer:seconds(?DEFAULT_CONNECTION_TIMEOUT_INTERVAL)}
      end.
  
  %%--------------------------------------------------------------------
  %% Function: handle_info(Info, State) -> {noreply, State} |
  