Commit Graph

1036 Commits

Author SHA1 Message Date
drbob
8b2cb688a8 Restored p3disc functionality.
* Bugfix in correctly adding ipList.
 * restored setLocal/Ext calls from peer.
 * Added extra debugging in p3disc.
 * Cleaned up debugging in p3connmgr.
 * switched off debugging in rsdiscitems.
 * reorder ipList (most recent first).
 * removed DEBUG switches in libretroshare.pro



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3252 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-04 15:16:52 +00:00
drbob
6f219d4fef Bugfixes:
* Corrected mLocal -> mExt in ipset.cc
  * Added pqiipset_test
  * added both Ext and Local address to GUI display.
  * p3connmgr: Ip Addresses only updated if we connected (otherwise port is wrong).
  * p3connmgr: update external address when we get it.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3251 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-04 13:19:09 +00:00
drbob
518de7b8c8 'open' Complained it needed 3rd argment (don't know why???)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3250 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-04 10:59:04 +00:00
drbob
ae4ee9df00 Networking REWORK: Changes for other bits
* Fixed #includes in upnp
 * switched p3disc over to the new data types.
 * added new source to .pro file
 * minor changes to other code.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3249 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-04 10:42:17 +00:00
drbob
8745c2fe2e Network REWORK: Partial tests for p3ConnectMgr behaviour..
* Added new test harnesses for pqiPersonGrp and pqiconnect.
 * Added 2 p3connmgr tests.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3248 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-04 10:38:54 +00:00
drbob
f4331da483 Networking REWORK: Major cleanup of p3ConnectMgr.
(Sorry for the ridiculously large check-in, wants to fix lots of stuff.)

Other Changes:
 * Added SSL Test Harness. (authssltest)
 * Added GPG Test Harness. (authssltest)
 * Reworked SSL/GPG startup to enable test harnesses
 * pqiperson: added notify of FAIL if connection method unavailable.
 * added p3tunnel to pqissltunnel init.
 * pqimonitor: added ipHistory to connect callback.
 
p3ConnectMgr Changes:
 * removed STUN system - wasn't operating correctly anyway without DHT.
 * switched to new IpAddress history data types. (removed lots of code)
 * Added Addr history for both Local and Ext addresses.
 * removed p3tunnel references in p3connmgr
 * fixed up mUseTunnelConnection flags (now used!)
 * fixed up mUseExtFinder flags (now used!)
 * added improved Net Status.
 * corrected UPNP / EXT / UDP startup. (was always UPNP).
 * fixed netReset() and netStartup().
 * removed unnecessary DEBUG code.
 * added UPNP timeout code (600 secs - why does it take so long?)
 * added improved netExtCheck().
 * removed wierd netConsistencyCheck() ... to rework.
 * corrected connect / reconnect code.
 * removed DHT notify code.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3247 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-04 10:35:38 +00:00
drbob
85e1b4b111 Network REWORK.
* Removed nasty list of ip addresses from rsPeerNetItem
 * create TLV type to handle ip address history instead.
 * switched to new data type. (should be seemless?)



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3246 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-04 10:17:37 +00:00
drbob
3575f12240 Network REWORK
* Added separate classes to handle IpAddress History.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3245 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-04 10:15:56 +00:00
leander-256
c0ba17fce3 Several fixes:
- stores an iterator rather than searching a map twice
- deletes a message when it can't be routed in routeGenericTunnelItem()
- deletes a message when its contents allocation failed in sendFileData()


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3244 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-04 05:50:33 +00:00
leander-256
fe46d7618a Prevent multiple instances from running on Unix systems.
Every call to RsInit::LoadCertificates() now creates a file:
~/.retroshare/xxxxxxxxxxxxxxxxxxxx/lock
which is then bound to a system lock (fcntl F_SETLK).

If the lock request fails, it means another instance is already
running with the same profile.


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3241 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-01 20:30:36 +00:00
csoler
c8fc75c75c added some safety checks to setting chunk strategy against inconsistent values.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3236 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-29 20:51:16 +00:00
csoler
f7ff141a37 restored the retroshare-nogui executable
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3225 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-27 16:28:44 +00:00
thunder2
918decfd0d fixed compile on Windows
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3224 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-27 00:18:33 +00:00
drbob
863a29fda1 NETWORK REWORK (cont)
Rework of AuthSSL: cleanup and split up.

 * Split out independent SSL functions into sslfns.h / sslfns.cc
 * Reworked SSL certificate storage.
 * Reworked SignDataBin / VerifyDataBin (fixed memory leaks).
 * Removed funny code: /* cert->cert_info->key->pkey is NULL */ 
     - just use X509_get_pubkey() instead.
 * Removed lots of old code.
 * Fixed up Mutex usage in AuthSSL - which was random.
 * Removed certificates from tlvSignature serialiser obj.
 * removed certificates from p3distrib messages.
 * Starting removing "unused parameter" compiler warnings.
 * Various related changes to make libretroshare compile.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3222 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-26 12:31:24 +00:00
drbob
545a465735 NETWORK REWORK (cont)
Changes required elsewhere
 * peerStatus() fn signature updates.
 * changed Heartbeat fn call in p3disc (think Heartbeat should be rethought!)
 * removed p3tunnel from libretroshare (used BAD getPeer() function).
 * removed optimisations from debugging.
 * removed test cases from libretroshare.a source list.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3221 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 22:13:52 +00:00
drbob
713d956882 NETWORK REWORK (cont)
* removing old tests and unused code.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3220 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 22:10:21 +00:00
drbob
bfa9965c9b NETWORK REWORK (cont)
* Removed unused FLAGS from pqi_base.h
 * corrected pqiStatus() fn signature in dhtmgr.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3219 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 22:09:07 +00:00
drbob
5df785ed4e NETWORK REWORK (cont)
* restored AuthSSL::Failed/CheckCertificate() calls.
 * removed mConnMgr->isConnected() checks. These should be elsewhere.
 * enabled exit(1) call if cannot open listening socket.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3218 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 22:06:49 +00:00
drbob
981724a8f1 NETWORK REWORK (cont)
p3connmgr: This needs major help... and will be revisited. 
Only changes to get code compiling for now.

 * revert peerStatus() function signatures (to match pqimonitor.h)



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3217 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 22:02:59 +00:00
drbob
9f4deb1cf7 NETWORK REWORK (cont)
pqiperson / pqipersongrp: generally okay, One Nasty BUG.

  * removed pqipersongrp::getPeer() fn. Violated Mutex protections!!!!
  * reworked heartbeat code, which used getPeer() fn.
  * switched all notifyConnect() calls to include remote_addr.
  * added explicit stoplistening() call when removing peer.
  * removed funny DO_NEXT_ATTEMPT callback code.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3216 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 22:00:38 +00:00
drbob
00d0d999dc * Removed list<IpAddressTimed> from callback
This functionality might need to be restored later, 
     but should be done with list<> for both Local and Remote Addrs.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3215 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 21:54:41 +00:00
drbob
ab3b044791 * changed misleading comment about Mutexs
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3214 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 21:52:21 +00:00
drbob
e4e80778e4 Networking REWORK (cont)
AuthSSL / AuthGPG: Bits and pieces still need fixing up.
AuthSSL will be rechecked later ;)

 * Mutex bug in authGPG (not very serious one).
 * removed _locked() suffix from functions (as they do the locking now).
 * added dummy FailedCertificate / CheckCertificate fns to AuthSSL
 * removed last bits of awful SSL_ex_data hack.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3213 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 21:50:46 +00:00
drbob
69ba03dbd2 First of the Networking REWORK checkings. I'm doing these is stages,
so I can properly document what is being changed!

Revert / Merge : pqissl / pqissludp code.
   * restored original timeout system.
   * removed weird testing code - should never have been here!
   * switched extra checks to generate ALERT msgs - we want to know if they happen.
   * removed quietShutdown (breaks TLS protocol - why was this added?)
   * switched listening on all the time. (helps restore disconnects).
   * restored common connect parameters (removed duplicates in ssludp).
   * restored AuthSSL->Failed/CheckCertificate() calls ... useful.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3212 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 21:44:24 +00:00
drbob
afb1d24bc7 * added missing test header
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3211 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 21:18:42 +00:00
csoler
c45b9416b5 added missign _FILE_OFFSET_BITS=64
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3210 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 20:17:56 +00:00
csoler
ec493a5e8b added test for extaddr finder
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3209 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 20:16:55 +00:00
thunder2
825ba0af79 AuthGPG: fixed some memory leaks in case of gpg error
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3207 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 14:38:38 +00:00
chrisparker126
673369371a still have to clean pending pub msgs and pointer deleted when sent.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3205 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 13:03:19 +00:00
chrisparker126
10353bb129 cachestrapper checks for physical presence of own cache files if
they don't exist they are not saved 
p3distrib:
don't refresh cache if file not written successfully

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3204 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 12:49:44 +00:00
drbob
47a2f06094 * disabled UDP and TUNNEL connections for debugging purposes.
This is done in libretroshare.pro - if you want to reenable them.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3201 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-24 18:06:10 +00:00
drbob
30210cf9ec * removed SSL ex_data sharing of sslids in pqissl+authssl.
This used an unprotected singleton -> bad... Probably killed a lot of connections.
 * removed mConnMgr tests in authssl 
	AuthSSL shouldn't use ConnectMgr. what happened to abstraction / seperation of function???
	This code prevents quick reconnections.

 * Disabled AuthSSL from adding new SSL peers.
	This functionality is important... but should be handled elsewhere (p3connmgr or pqissl)



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3200 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-24 17:41:34 +00:00
drbob
a24d833a12 * Split the pqiperson test out into tesetconnect.cc
* Added incomplete pqipersongrp_test



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3199 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-24 17:22:58 +00:00
chrisparker126
1edca45020 created services test folder move forum_test to tests/services folder
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3197 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-24 11:29:25 +00:00
chrisparker126
480e327c91 added dsitrib item tests: channels, grp, grp key, signed msg.
- also added support src for serialiser test - add functions here that could be generally used throughout serialiser tests

- fixed empty grp id set of grp keys in creategrp function

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3196 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-24 10:35:00 +00:00
drbob
fc6a0dff50 * Added basics of pqiperson_test
* Built pqiconnect test harness - need to separate from test



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3192 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-22 23:00:23 +00:00
csoler
5045e720b2 Corrected two harmful bugs in tunnel connexion code:
- added a destructor to RsTunnelDataItem, to remove a memory leak on all data packets.
- apparently the code would allow data items of zero size, hence calling malloc(0), which
  has undetermined behavior.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3191 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-22 21:05:56 +00:00
csoler
13671d03ea turned constructors into static functions, to avoid the need of exception handling, and thus treat errors correctly on windows
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3190 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-22 20:29:59 +00:00
chrisparker126
41fb02d556 consolidated tlvtype.h items into single test file,
and added image, hashset and bindata tlv tests. 
removed redundant tlvconfig and tlvfileitem src files. 

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3189 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-22 18:14:39 +00:00
chrisparker126
49aab4704d removed redundant qblog item
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3188 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-22 17:31:56 +00:00
chrisparker126
809a7a7173 removed redundant qblog item
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3187 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-22 17:28:51 +00:00
csoler
531567997d branch commit 3185: removed deadlock situation in data multiplex
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3186 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-21 19:10:55 +00:00
csoler
ff1f521a2b added tests for rstunnel item serialization
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3182 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-20 21:36:53 +00:00
csoler
d5d3fb7860 added unitary tests for serialization of turtle items
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3181 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-20 21:05:18 +00:00
drbob
f9e9bf58a5 * Added test for pqiarchive. (similar test can be used for pqistreamer / pqistore).
NOTE: This tests packets up to size of 1Mb. This causes the test to FAIL
   due to getRsPktMaxSize() returning 262142.... What to do? This needs to be fixed!
  
   see comments at serialiser/rsserial.cc line 448
  


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3180 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-20 19:54:33 +00:00
drbob
b23b0a5d70 * Added first network function tests.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3179 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-20 16:04:53 +00:00
drbob
b8f9503c8d * Updated tlvbase_test.cc
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3178 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-20 14:28:26 +00:00
drbob
3855be974b * Moved final serialiser test over, and test notes from ft.
* removed tests from lib directories for serialiser / dbase / ft



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3177 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-20 12:37:04 +00:00
drbob
05bc4ba76e * fixed ftdata testharness functions (ftdata.h)
* Added existing ft tests to tests directory (don't work yet!)
 * Added dbase tests to tests directory (don't work yet!)
 * moved net_setup test to tests/general directory (don't work yet!)



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3176 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-20 12:24:05 +00:00
drbob
9c6a3a7781 * Introduced new tests directory.
* added old serialiser tests (FAIL at the moment).
 * moved Makefile scripts to tests diectory.





git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3173 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-20 11:08:39 +00:00