anchor.diff:                      Url = io_lib:format("http://~w.~w.~w.~w:60210/sid/~s",
                                           [A,B,C,D,Sid]),
                       qry:add_result(Qpid, {struct, 
  -                                          [{<<"url">>, list_to_binary(Url)}|L2]});
  +                                          [{<<"url">>, list_to_binary(Url)}|L2]}),
  +                    {noreply, State};
                   _ ->
  -                    io:format("noop1",[])
  +                    {noreply, State}
               end;
           
           <<"rq">> ->
               Qid = proplists:get_value(<<"qid">>, L),
  -            Cbs = [ fun(Ans)-> ?MODULE:send_response(Ans, Qid, Ip, 60210) end ],
  -            resolver:dispatch({struct,L}, Qid, Cbs);
  +            % do nothing if we dispatched, or already received this qid
  +            case ets:lookup(State#state.seenqids, Qid) of
  +                [{Qid, true}] -> {noreply, State};
  +                _ ->           
  +                    ets:insert(State#state.seenqids, {Qid,true}),
  +                    Cbs = [ fun(Ans)-> ?MODULE:send_response(Ans, Qid, Ip, 60210) end ],
  +                    resolver:dispatch({struct,L}, Qid, Cbs),
  +                    {noreply, State}
  +            end;
               
  -        _ -> io:format("noop2",[])
  -    end,
  -    {noreply, State};
  +        _ -> {noreply, State}
  +    end.
       
  -handle_info({udp, _Socket, _Ip, _InPortNo, _Packet}, State) ->
  -    {noreply, State}.
  -
   terminate(_Reason, State) ->
       gen_udp:close(State#state.sock),
       ok.
  
positive.code: -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
       terminate/2, code_change/3]).
  
  -record(state, {sock}).
  -define(BROADCAST, {239,255,0,1}).
  
  %% API
  
negative.code: %% Uses UDP multicast to resolve against other instances of this code
  %% running elsewhere on the LAN. Streams via HTTP.
  
  -module(lan_resolver).
  
  -behaviour(gen_server).
  