anchor.diff:                                               LeaseToken :: binary().
   end_lease(Uid, LeaseToken) ->
       gen_server:call(?MODULE, {be_req, end_lease, {Uid, LeaseToken}}).
  +
   
   %%--------------------------------------------------------------------
   %% @doc
  
positive.code: %%
  %% @end
  %%--------------------------------------------------------------------
  handle_info(Info, State) ->
      lager:warning("Unknown message received: ~p", [Info]),
      {noreply, State}.
  
negative.code: %% @doc
  %% Handling call messages
  %%
  %% Note on asynchronicity:
  %%
  %% As part of each request, the frontend (cvmfs_fe) calls into the
  %% backend (cvmfs_be), which then calls into different submodules.
  %% Each backend API call will be made from different processes,
  %% since Cowboy spawns a new process for each request. To avoid
  %% blocking the gen_server, in the handle_call callback, we always
  %% return {noreply, State}, to block the calling process and
  %% dispatch the actual request handling to a new subprocess, which
  %% will later complete the request using gen_server:reply.
  %%
  %% @end
  %%--------------------------------------------------------------------
  handle_call({be_req, new_lease, {Uid, KeyId, Path}}, From, State) ->
      Task = fun() ->
                     case p_new_lease(KeyId, Path) of
                         {ok, LeaseToken} ->
                             lager:info("Backend request: Uid: ~p - {new_lease, {~p, ~p}} -> Reply: ~p",
                                        [Uid, KeyId, Path, LeaseToken]),
                             gen_server:reply(From, {ok, LeaseToken});
                         Other ->
                             lager:info("Backend request: Uid: ~p - {new_lease, {~p, ~p}} -> Reply: ~p",
                                        [Uid, KeyId, Path, Other]),
                             gen_server:reply(From, Other)
                     end
             end,
      spawn_link(Task),
      {noreply, State, ?ASYNC_TIMEOUT};
  handle_call({be_req, end_lease, {Uid, LeaseToken}}, From, State) ->
      Task = fun() ->
                     Reply = p_end_lease(LeaseToken),
                     lager:info("Backend request: Uid: ~p - {end_lease, ~p} -> Reply: ~p",
                                [Uid, LeaseToken, Reply]),
                     gen_server:reply(From, Reply)
             end,
      spawn_link(Task),
      {noreply, State, ?ASYNC_TIMEOUT};
  handle_call({be_req, submit_payload, {Uid, SubmissionData}}, From, State) ->
      Task = fun() ->
                     Reply = p_submit_payload(SubmissionData),
                     {LeaseToken, _Payload, Digest, HeaderSize} = SubmissionData,
                     lager:info("Backend request: Uid: ~p - {submit_payload, {~p, ~p, ~p, ~p}} -> Reply: ~p",
                                [Uid, LeaseToken, <<"payload_not_shown">>, Digest, HeaderSize, Reply]),
                     gen_server:reply(From, Reply)
             end,
      spawn_link(Task),
      {noreply, State, ?ASYNC_TIMEOUT};
  handle_call({be_req, get_repos, Uid}, From, State) ->
      Task = fun() ->
                     Reply = p_get_repos(),
                     lager:info("Backend request: Uid: ~p - {get_repos} -> Reply: ~p",
                                [Uid, Reply]),
                     gen_server:reply(From, Reply)
                end,
      spawn_link(Task),
      {noreply, State, ?ASYNC_TIMEOUT};
  handle_call({be_req, check_hmac, {Uid, Message, KeyId, HMAC}}, From, State) ->
      Task = fun() ->
                     Reply = p_check_hmac(Message, KeyId, HMAC),
                     lager:info("Backend request: Uid: ~p - {check_hmac, {~p, ~p, ~p}} -> Reply: ~p",
                                [Uid, Message, KeyId, HMAC, Reply]),
                     gen_server:reply(From, Reply)
             end,
      spawn_link(Task),
      {noreply, State, ?ASYNC_TIMEOUT};
  handle_call({be_req, unique_id}, From, State) ->
      Task = fun() ->
                     Reply = p_unique_id(),
                     lager:info("Backend request: {unique_id} -> Reply: ~p", [Reply]),
                     gen_server:reply(From,Reply)
             end,
      spawn_link(Task),
      {noreply, State, ?ASYNC_TIMEOUT}.
  
  
  %%--------------------------------------------------------------------
  