Commit Graph

33 Commits

Author SHA1 Message Date
csoler
1554e17f48 patch from Stefan Sperling to allow compilation on OpenBSD
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6613 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-08-25 21:06:29 +00:00
csoler
531966f3c9 added missing include
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5441 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-08-19 18:41:09 +00:00
thunder2
8b7f71b284 Fixed compile on Windows.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5437 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-08-17 16:37:07 +00:00
csoler
c3db4dacf7 added code to avoid corruption of bdboot.txt: first write to tmp file then move the file. Refers on Windows utf16ToUtf8 from libretroshare. This forward reference can be improved.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5434 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-08-16 16:59:51 +00:00
thunder2
2367653146 Fixed crash when using rs_sprintf/bd_sprintf or rs_sprintf_append/bd_sprintf_append with empty result (maybe only on Windows).
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5349 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-07-29 13:28:45 +00:00
drbob
ede890417e Changes to make libbitdht compile on OSX.
- changed <malloc.h> => <stdlib.h>
	- put #ifdef __cplusplus protection in bdstring.h so it can be used by C modules.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5231 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-06-19 10:36:48 +00:00
thunder2
4e26884646 Removed some std::ostringstream.
To be continued.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5111 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-04-19 20:44:32 +00:00
thunder2
0b1126babf Added thread safe function for inet_ntoa in libbitdht.
Used the existing thread safe function for inet_ntoa in libretroshare.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5033 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-03-18 01:33:25 +00:00
thunder2
970d88200d Removed some more compiler warnings from Windows compile (GCC 4.4).
Added -Wextra to the Windows compile.
Added new define in libbitdht for snprintf and fprintf to proper handling of "%ll" under Windows.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4951 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-02-17 10:03:38 +00:00
drbob
f08bcc153e * Disabled Thread debugging.
* Fixed up bdProxyId initialisation
 * Improved Error Code translation (for unknown entries)



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4826 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-01-20 17:30:16 +00:00
drbob
4cd7523947 Incremental Improvements to DHT:
Added Knowledge of Friends, Friends of Friends and Relays.
	- Added bdfriendlist class to store information.
	- New interface function updateKnownPeer().
	- includes IP addresses, if known. (for filtering)

Bad Peer Filtering.
	- Check IDs against known peer IP addresses.
	- Added checks in checkPotentialPeer().
	- Added checks in addPeer().
	- Running in TestMode at the moment (Bad Peers are only flagged).

Other Fixes:
	- Removed some warning about int/uint comparisons.
	- added bdSpace::flagpeer() fn to support above.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4680 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-11-22 13:16:03 +00:00
drbob
5ea8cfb67d Added Ben's patches:
* Compilation for FreeBSD.
	* Notes that MT is not cryptographically secure.
	* modified sorting of DHT Window.

Only one change that I didn't commit:

 bitdht {
-       LIBS += ../../libbitdht/src/lib/libbitdht.a
-       PRE_TARGETDEPS *= ../../libbitdht/src/lib/libbitdht.a
+       LIBS += ../../libbitdht/src/libbitdht.a
+       PRE_TARGETDEPS *= ../../libbitdht/src/libbitdht.a
 }

As this would have broken compilation on the other platforms.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4619 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-09-28 15:16:21 +00:00
thunder2
27842b8592 Removed unused parameter warnings in libbitdht.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4557 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-08-12 12:43:24 +00:00
drbob
5e691935fd Merged from /branches/v0.5-peernet/libbitdht:r4357-4397
Bugfixes and a couple of small improvements to the DHT code.
 * fixed up buggy overloading for the udplayer (for testing).
 * added processing multiple (5) remote processes per tick. 
     - (1 wasn't enough in testing, and led to dropped peers) 
 * removed unused variables from query data structure.
 * #defined out debugging in bdSpace, removed old functions.
 * More agressive attempts to find proxies for connections.
 * made "final query attempt" use exact peer address rather than midid.
     - mid id meant that the target wasn't always returned.
 * tweaked bdconnection debugging.
 * increase CONNECTION_MAX_TIMEOUT from 30 => 45. wasn't enough!
 * Limited bdQuery::QueryIdlePeriod to 15min (was unlimited).
 * added bdQuery::PotentialPeer cleanup functions - for more robust reporting.
 * fixed bdQuery debugging printouts.
 * Implemented BITDHT_QFLAGS_UPDATES flag.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4398 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-06 00:14:58 +00:00
drbob
24351cb460 * added #define WIN32 protection for <malloc> in bdbloom
* disabled ATTACHED mode by default.
 * set reasonable default Startup parameters (had test ones before)



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4397 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-05 23:53:40 +00:00
thunder2
e6062f4513 Fixed compile on Windows.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4361 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-06-29 19:05:03 +00:00
drbob
79b48d5a89 Merging from branches/v0.5-peernet/libbitdht (--- Merging r4354 through r4356 into '.')
* adding Bloom filter to speed up finding RS peers.
 * fixed startup bug. (loops into FAILURE)




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4357 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-06-29 16:06:33 +00:00
drbob
fff40eceac Merging branches/v0.5-peernet/libbitdht (Merging r4237 through r4353 into '.')
There are many significant improvements to the DHT here. 
See commit logs on v0.5-peernet branch for details.

This is not the final merge, but brings over the majority of expected v0.5-peernet/libbitdht changes 




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4354 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-06-29 10:46:11 +00:00
csoler
6589b49025 re-enabled mutex initialization, because RS could not start.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3860 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-23 08:01:22 +00:00
drbob
ea3311eb2a Tweaked bitdht interface to remove need for double entry to libbitdht.
* made PeerCallback() pass a bdId rather than a bdNodeId.
 * disabled recursive mutex to test!.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3857 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-23 00:02:54 +00:00
csoler
8a3d3f8c0d enabled recursive lock behavior on main bitdht thread to handle self-lock in DHT callbacks
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3849 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-21 22:46:47 +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
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
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
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
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
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
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
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
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