|
Register | FAQ | The Twelve Commandments | Members List | Calendar | Arcade | Find the Best VPN | Today's Posts | Search |
General Gnutella Development Discussion For general discussion about Gnutella development. |
| LinkBack | Thread Tools | Display Modes |
| |||
Trying to upload a file But i've encountered several problems that lead me to the conclusion that i am missing something here. Right now my biggest problem is that sending queryHit with a different sha1 for the file (not the correct one, just one i made up) starts the DL, where as using the correct one (should be, i've calculated the sha1) give me "no sources" in gtk-gnutella and the DL won't start. Other than the sha1 - the queryHit is the same - but with the fake sha1 i also get the HTTP GET message that asks for the file and i don't get it using the real sha1. The reason i'm doing that is to test calculating the sha1 for a file i already have - when using the fake sha1 after i finish DL (using both gtk-gnutella and Phex for DL the file from my program) - it gives me a message about wrong sha1 (of course, i made the sha1 up) and restarting DL. Now i wanted to check the correct sha1 - and expected not to see this message. This is my biggest problem right now, please help. |
| |||
The problem might be that Gtk-Gnutella remembers the SHA1s of files it has downloaded before. That could cause the "no sources" issue if you try to run your test multiple times. Remove ~/gtk-gnutella/done.* or hack the sources to skip this check in src/core/ignore.c. |
| |||
Thanks for the response But i have more info - the thing is more complex than what i thought: My sha1 as i calculated it is: 3IRE53N5YXBD2AFSPHPWPMINI53O63DB. If i change the first I to R or T - it works! meaning the only thing that does not work for me is this particular sha1 or something. Also - this happens in LimeWire as well. I have the code on my Eclipse so i can debug it and see why the sha1 i've calculated using the LW/FW's code does not work (meaning it does not send me the GET message) but if i destroy it (change it randomally) - it does. Any thoughts? Maybe where to look in the code (i'm starting digging, i'll see what i come up with). |
| |||
I tried what you said I printed this buffer - 500 times 0 that i've created like this: ByteBuffer buffer = ByteBuffer.allocate(500); printed to a file, than i asked my method call to generate sha1 for this and the result is: 7RLNJM6HFKF74WJTOPDUBVKY5QJUBLDT Is it okay? Other than that, i don't understand - if i faked a sha1 it asks for the file and if i give it the sha1 the i generated i don't? why is the fake better than the calculated one? |
| |||
See?! now i've inserted the sha1 of the nulls and still it asked me the file. I change only the sha1 to the one for the file with the nulls and i got a request: GET /uri-res/N2R?urn:sha1:7RLNJM6HFKF74WJTOPDUBVKY5QJUBLDT HTTP/1.1 Why when i change the sha1 to the URN for the real file it doesn't request anything? it doesn't check for validation, so what's wrong? Again, the only thing i change is the sha1 string - nothing else. |
| |||
No - every time i try it's the same file name the only thing i change in the queryHit is the sha1 - i change letters and sometimes the whole sha1. It allows me to DL the same file over and over again - just when i double click on the search result with the calculated sha1 it doesn't send me the GET request - only with the sha1 i stated in my msg. Every other sha1 i insert is ok for the clients. I will now search in FW/LW's code what happens after i double click the file name from the search result - and take it from there. If anyone can help i'll be gratefull. |
| |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
upload non existent file? | lagrepr | Download/Upload Problems | 2 | April 2nd, 2007 01:39 PM |
How do I upload a file? | UnderDog28 | Download/Upload Problems | 12 | April 14th, 2006 11:00 PM |
How To Upload a file??? | SlowFinger | Download/Upload Problems | 3 | February 24th, 2006 12:49 AM |
how i upload i file? | REDRIDER16 | Open Discussion topics | 1 | January 6th, 2005 07:36 PM |
how do you upload a SIT file? | eskmo | Download/Upload Problems | 2 | September 8th, 2002 10:30 AM |