anchor.diff:  -spec select_chunks_by_piecenum({pos_integer(), pos_integer()}, pos_integer()) ->
   			   {ok, {pos_integer(), term()}, non_neg_integer()} | {error, already_taken}.
   select_chunks_by_piecenum({TorrentId, Pn}, Max) ->
  -    gen_server:call(?SERVER, {select_chunks_by_piecenum, {TorrentId, Pn}, Max}).
  +    gen_server:call(?SERVER, {select_chunks_by_piecenum, {TorrentId, Pn}, Max},
  +		    infinity).
   
   
   %%====================================================================
  -%% gen_server callbacks
  -%%====================================================================
  -
  -%%--------------------------------------------------------------------
  -%% Function: init(Args) -> {ok, State} |
  -%%                         {ok, State, Timeout} |
  -%%                         ignore               |
  -%%                         {stop, Reason}
  -%% Description: Initiates the server
  -%%--------------------------------------------------------------------
   init([]) ->
       _Tid = ets:new(?TAB, [bag, protected, named_table, {keypos, #chunk.idt}]),
       D = dict:new(),
       {ok, #state{ torrent_dict = D }}.
   
  -%%--------------------------------------------------------------------
  -%% Function: %% handle_call(Request, From, State) -> {reply, Reply, State} |
  -%%                                      {reply, Reply, State, Timeout} |
  -%%                                      {noreply, State} |
  -%%                                      {noreply, State, Timeout} |
  -%%                                      {stop, Reason, Reply, State} |
  -%%                                      {stop, Reason, State}
  -%% Description: Handling call messages
  -%%--------------------------------------------------------------------
   handle_call({new, Id}, {Pid, _Tag}, S) ->
       ManageDict = dict:store(Pid, Id, S#state.torrent_dict),
       _ = erlang:monitor(process, Pid),
  
positive.code:     {noreply, State}.
  
  
  %%--------------------------------------------------------------------
  %% Function: handle_info(Info, State) -> {noreply, State} |
  %%                                       {noreply, State, Timeout} |
  %%                                       {stop, Reason, State}
  %% Description: Handling all non call/cast messages
  %%--------------------------------------------------------------------
  handle_info({'DOWN', _Ref, process, Pid, _Reason}, S) ->
      {ok, Id} = dict:find(Pid, S#state.torrent_dict),
      clear_torrent_entries(Id),
  
negative.code: -ignore_xref([{start_link, 0}]).
  
  %%====================================================================
  -spec start_link() -> ignore | {ok, pid()} | {error, any()}.
  start_link() ->
      gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
  
  %% @doc Mark a given chunk as fetched.
  %% @end
  -spec mark_fetched(integer(), {integer(), integer(), integer()}) -> found | assigned.
  mark_fetched(Id, {Index, Offset, Len}) ->
      gen_server:call(?SERVER, {mark_fetched, Id, Index, Offset, Len}).
  
  %% @doc Store the chunk in the chunk table.
  %%   As a side-effect, check the piece if it is fully fetched.
  %% @end
  -spec store_chunk(integer(), {integer(), binary(), term()}, {integer(), integer()}, pid()) ->
                  ok.
  store_chunk(Id, {Index, D, Ops}, {Offset, Len}, FSPid) ->
  