Registered Member
|
I checked "netstat -l" because nothing happened in dht and I noticed that the tcp was shown but not the udp port for dht action. Startet and stopped ktorrent but nothing happened. After setting the port to another one everything goes in the right direction, but when I stop ktorrent again it isnt bind/binded/bounded (whats the right word?).
I havent checked the code but will do it in some minutes (need to push my guests out of the room ). OK, the socks->bind in RPCServer::start definitly says that it was everything ok (but it isn't). EDIT: Yes, I tested if the port doesnt get any data with "nc -u PORT". When I change the post -> LISTEN in "netstat -l" i can connect to the udp port and create some parse errors (ok, next time i write correct data to it ). I really dont know why it doesnt listen normally to it. PS: I am using qt 3.3.6 and kdelibs 3.5.5 on linux 2.6.18. EDIT: A fix (?) is to enable blocking instead of disable it. This is not my idea but the idea of the kdecore api documentation of KDatagramSocket: "If the socket is blocking, the socket will be bound when this function returns." It doesnt they how to really reaaalllyy REAALLLLYYY (sry, but it makes me angry) bind it to a port with non blocking sockets. Maybe it is possible to set blocking after the bind attempt? It works here but I dont know why it works when I do it a second time and it was set to non-blocking before the bind. To change to blocking mode also fixes the problem that it crashes when you change the port relative fast 3 (or 2?) times in a row. Working test:
|
Moderator
|
|
Registered Member
|
|
Registered Member
|
Could be....or not. I never run a real release of ktorrent, just svn. Just use "netstat -l|grep udp" and look if your dht port is shown. But the patch itself should work with ktorrent 2.0.3 (please use the patch from svn - my patch was just a quick test).
|
Registered Member
|
|
Moderator
|
This bug is also in 2.0.3. I don't actually understand this bug. So what if it isn't bound immediatly ? We can wait, binding does not take long normally, as it is an entirely local operation. |
Registered Member
|
I also dont understand it a small low level test with enable non-blocking before binding works perfect:
|
Moderator
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar