Well, that isn't quite accurate, but I have made the change.

I am not incredibly familiar with this part of the code since you guys
played with it, so here are the guts of the modification - feel free to
review.

InsertRequest.java:

    protected void refFound(NodeReference ref, Node n, 
                            KeyedMM kmm) throws RequestAbortException {
        Core.logger.log(this,"Received InsertRequest for key that was
seen before, the Insert will be forwarded as normal",Logger.MINOR);
    }

    protected void dataFound(Entity doc, Node n, 
                             KeyedMM kmm) throws RequestAbortException {
        Core.logger.log(this,"Key collision, received InsertRequest for
previously known key, requesting its original data",Logger.MINOR);
        DataRequest dr = new DataRequest(id,hopsToLive,depth,searchKey);
        dr.initSources(receivedAt,source,receivedWith);
        throw new RequestAbortException(dr.pReceived(n,null));
    }
---

Ian.

On Fri, Dec 29, 2000 at 05:28:02PM +0100, Oskar Sandberg wrote:
> It's trivial. Simply do nothing in the refFound() method of
> InsertRequest.java.
> 
> On Fri, Dec 29, 2000 at 12:18:31AM -0800, Ian Clarke wrote:
> > Anyone fancy fixing insert collisions so that they only fail if the data is
> > found (they currently also fail if a reference is found, meaning that even
> > after some data has fallen out of freenet, it cannot up updated until the
> > references have fallen out too).  Should be pretty simple and a good
> > introduction to the Freenet messaging core.  The stuff you need to understand
> > and modify is in Freenet.message.* (take a look at InsertData.java and its
> > superclass).
> > 
> > Ian.
> > 
> 
> 
> 
> -- 
> 'DeCSS would be fine. Where is it?'
> 'Here,' Montag touched his head.
> 'Ah,' Granger smiled and nodded.
> 
> Oskar Sandberg
> [EMAIL PROTECTED]
> 
> _______________________________________________
> Freenet-dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/mailman/listinfo/freenet-dev

PGP signature

Reply via email to