anchor.diff:  -author('schuett@zib.de').
   -vsn('$Id$').
   
  --define(TRACE(X, Y), io:format(X, Y)).
  -
   -include("scalaris.hrl").
   
   % public API:
  --export([issue_bulk_owner/3, issue_send_reply/4,
  -         issue_bulk_distribute/5, issue_bulk_distribute/6,
  +-export([issue_bulk_owner/3, issue_send_reply/4, issue_bulk_distribute/5,
            send_reply/5, send_reply_failed/6]).
   
   % only use inside the dht_node process:
  
positive.code:             false ->
                  case Msg of
                      {bulk_distribute, Proc, N, Env, Data} ->
                          RangeData = get_range_data(Data, Range),
                          ?TRACE("~p bulk_distribute: sending to node ~p on interval ~p
                                 Msg: ~p",
                                 [self(), node:pidX(Head), Range, {bulkowner, Id, Range,
                                {bulk_distribute, Proc, N, Env, RangeData}, Parents}]),
                          comm:send(node:pidX(Head),
                                {bulkowner, Id, Range,
                                {bulk_distribute, Proc, N, Env, RangeData}, Parents});
  
negative.code:         false ->
              case Msg of
                  {bulk_distribute, Proc, N, Env, Data} ->
                      {SuccData, _Rest} = lists:partition(
                              fun(Entry) ->
                                  intervals:in(?RT:hash_key(element(1, Entry)),
                                              SuccIntI)
                              end, Data),
                      comm:send(node:pidX(nodelist:succ(Neighbors)),
                                {bulkowner, deliver, Id, SuccIntI,
                                {bulk_distribute, Proc, N, Env, SuccData}, Parents});
  