URL:
  <http://savannah.nongnu.org/patch/?5336>

                 Summary: Fix LowID support for eDonkey network
                 Project: mldonkey, a multi-networks file-sharing client
            Submitted by: krissn
            Submitted on: Sunday 08/27/2006 at 18:12
                Category: Bug fixes
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open

    _______________________________________________________

Details:

The fact that MLDonkey has a problem with indirect connections is really
nothing new. I've been digging into this for some time and I think I found
the main reason why this doesn't work. The normal handling of a LowID client
is as follows:
1. MLD gets a LowID source. A client structure for client 1 is created with
client_kind Indirect_address(serverip, serverport, clientid, 0.0.0.0, 0). The
IP:port is not known at this stage.
2. CommonSources issues a connection request to client 1.
3. MLD sends a QueryID packet to the server owning that client.
4. The client connects and is identified as a new incoming connection. A
search is made to find out, if such a client is already known, but this
search won't bring any results, because now that the real IP:port is known,
we search for a client with client_kind = Indirect_address(serverip,
serverport, clientid, clientip, clientport). Of course such a client doesn't
exist and a new client 2 is created.
5. CommonSources doesn't know that client 1 (which is not connected) and
client 2 (which is now connected and waiting for a file request) are in fact
one and the same client. As a result client 1 connection attempt fails, and
client 2 disconnects itself after some idle time, because it didn't receive
any request.

To make things work I've fixed stage 4. I've rewritten the comparison in
donkeyGlobals:new_client to ignore client IP:port if the client is indirect.
The effect: callback connections running and resulting in a nice, fat data
stream from indirect sources right after adding a file into the download
queue.

Please review this patch whether it is correct or improve it, as I think
there is still some room for it.






    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sunday 08/27/2006 at 18:12  Name: mldonkey-2.7.7-lowid.patch  Size:
2.04KB   By: krissn

<http://savannah.nongnu.org/patch/download.php?file_id=10610>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5336>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
Mldonkey-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/mldonkey-users

Reply via email to