Commit Graph

133 Commits

Author SHA1 Message Date
drbob
5b70ef6076 A bit of debug - cleaning up.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3722 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-31 13:58:54 +00:00
drbob
258f545361 * Fixed startup logic, so the DHT doesn't continually restart - if low peer count.
* properly initialised bdId.addr and other struct sockaddr_in.
 * This should fix the windows bitdht - not send - issue.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3687 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-20 18:36:25 +00:00
drbob
9cf531fc9a Modified bitdht to enable simultaneous peer searches.
* Added maximum msg limits (20, 50, 100 msgs per sec). 50 = default.
 * Priority send out pings, with 10% queries.
 * switched bdquery list in bdnode to use pointers... so peers can be 
   	easily reordered (queue for queries).
 * Add all find peers, once dht initialised.
 * Added reset if FINDSELF fails. (don't know if this is a good idea!)
 * simplified DHT printouts. verbose versions are enabled with debug.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3686 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-19 22:03:38 +00:00
drbob
74961774cc * Added new interface functions for start / stop DHT and to get stats.
* Implemented start/stop interface in udpbitdht and bemanager
 * added Restart of DHT if it fails to get going.
 * added start / stop functionality to bdnode and bdstore
 * added cleanup code to rest of bitdht classes.
 * reworked NetworkSize calc functions.
 * added thread debugging (prints at start / stop / join).
 * TESTS: added utest.h header file for automated unit testing (from libretroshare)
 * TESTS: bdmetric_test started conversion to automated tests
 * TESTS: udpbitdht_nettest. Added dht start / stop and network reset (thread join) functionality.
 * TESTS: fresh bdboot.txt



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3678 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-17 20:55:32 +00:00
thunder2
1d42757a64 Fixed compile on Windows.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3642 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-07 19:49:50 +00:00
csoler
3b2ab05993 corrected possible invalid write
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3640 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-07 19:25:40 +00:00
csoler
2e8d9dae7f tentative of blind bug fixing
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3624 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-06 21:44:38 +00:00
csoler
a76566c65d suppressed memory fault (call to ++it on a invalid iterator). Simplified a bit some syntax
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3623 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-06 19:32:55 +00:00
csoler
dffd2ad686 suppressed uninitialized memory read
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3621 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-06 19:01:13 +00:00
drbob
cc5fa5e5dc Fixed up BITDHT versioning.
* Advertises client as DBxxxx where xxxx is provided by using app.
  * Added COMPILE switches to enable ANONYMOUS version or remove BD portion.
  * Fixed version code.
  * Added slow increase in retry timeout, to reduce DHT traffic over time.
      now RETRY PERIOD = query age / 2  
  * initialised bdToken bdVersion etc length.
  * new bdboot.txt 



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3615 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-05 21:57:22 +00:00
csoler
3c29434007 bug correction (uninitialized value caused SIGSEGV)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3613 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-05 15:49:28 +00:00
drbob
20a49a59cf Improvements to DHT, to support UDP connections.
* Changed getDhtPeerAddress() / Value() function to use const *bdNodeId.
 * Filled in getDhtPeerAddress()... to support UDP connections.
 * fixed bug in bdnode:: pong msg... wasn't checking if version existed.
 * printed out version string, as part of debug.
 * added IpAddr field to bdmanager peer search data.
 * stored IpAddr from queries... when peer found.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3604 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-04 21:37:07 +00:00
thunder2
ccaebe2fae Added missing returns.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3591 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-02 20:05:27 +00:00
drbob
0ca009c4fa * reduced gap between peer addition.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3585 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-02 00:47:56 +00:00
drbob
90daeacc36 * added extra debugging for rs integration testing.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3578 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-01 19:43:54 +00:00
thunder2
750c1a9403 Fixed compile on Windows.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3573 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-09-30 20:16:25 +00:00
drbob
dbbf71788d * BUGFIX. bdId comparison was wrong... fixed.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3565 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-09-29 22:53:49 +00:00
drbob
2964533caf * Added history to .pro
* modified nettest to be useful as a test program



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3562 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-09-29 20:37:30 +00:00
drbob
aa46ed0f69 * BUGFIX: enabled more than 10 outgoing msgs for the DHT. (max 5000 / sec now)
* Added debug message when the udp port changes.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3561 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-09-29 20:02:39 +00:00
drbob
b690f933c1 * Added usleep fn definition to windows
* fixed compile warning.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3560 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-09-29 20:01:04 +00:00
drbob
c9229fb6e8 bitdht improvements
* Added bdHistory, to monitoring all the p2p dht messages (disabled normally)
 * cleaned up all compile warnings on OSX.
 * added Found timestamp to peer info.
 * disable save, until store is close to full.
 * ...?other stuff?



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3559 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-09-29 19:59:31 +00:00
thunder2
e69300ccdc Changed the values of ETIMEDOUT to 10060 like in pthread.h to prevent compiler warnings.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3341 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-08-04 11:27:16 +00:00
thunder2
a595ba4fc7 Moved constructor of class bdThread from bdThreads.h to bdThreads.cc.
Initialized member mTid of class RsThread too.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3338 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-08-03 14:26:54 +00:00
thunder2
e71b1c249f Initialized member mTid of class bdThread.
RetroShare crashes on start, when the initial address on port 7812 is in use.
The thread in UdpLayer::openSocket was not started and the member mTid was uninitialized.
Then a call to join in UdpLayer::reset during the load of the configuration crashes.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3337 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-08-03 14:07:46 +00:00
drbob
f876dcb93b General Bugfixes from RS integration.
* heisenbug fixed. msgout_find_node was inside debugging #defs.
 * fixed ReplyFindNode and ReplyQueryHash counters for stats.
 * added Node Space size() functions.
 * added FINDSELF mode. 60 secs to search for own hash.
 * incremental addition of search ids.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3326 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-08-01 18:19:27 +00:00
drbob
c1b624832f updates to libbitdht to make it work with retroshare.
* decreased nodes per bucket to 10 - to try reduce traffic.
 * changed operator< to non const.
 * fixed up debuging.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3322 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-31 18:01:24 +00:00
drbob
f7282edf33 removed unix include. windows should now compile!
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3306 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-18 21:49:58 +00:00
drbob
0049549eb7 * changed inet_aton into bdnet_inet_aton for windows compatibility
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3304 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-18 21:22:59 +00:00
defnax
b5461e0544 fixed first windows compile include missed
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3303 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-18 20:49:40 +00:00
drbob
d70337a642 First pass for windows compilation:
* brought over tou_net / tou_error => bdnet for windoze compatibility.
 * updated udplayer to inline with rs changes + win compatibility.
 * removed unix only networking #includes, replaced with "util/bdnet.h"
 * added subdirectory to #includes.
 * made udpbitdht_nettest use a random node id.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3302 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-18 16:28:51 +00:00
drbob
1787e50b94 Changes to get tests compiling on MacOSX.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3278 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-10 14:17:29 +00:00
drbob
2200b5b679 * Enabled test. NB: must make nodeId random!
* added bootstrap ids to test directory.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3277 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-10 12:56:35 +00:00
drbob
c415bb6158 Addition of libbitdht.
============================================================

This is intended to be a completely independent library from RS, 
(hosted at sf.net/projects/bitdht) hence is being commited at the top level.

As initial further development / testing will be driven by RS integration
it is being added to the RS repository. Equally important is ensuring
that RS can compile without requiring aux libraries.

Once libbitdht is further developed, this section of the repository
is expected to be removed... But that will not be for a while, I expect.

drbob.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3276 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-10 11:48:24 +00:00