Commit Graph

517 Commits

Author SHA1 Message Date
csoler
4b9087b60d removed dead-end for peers not answering downloads, that would get file cache transfers to get stuck indefinitly when peers are too much stressed for a short period. The offline state is entirely given by setPeerState()
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6206 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-03-11 20:33:49 +00:00
csoler
4e4e81fa8e fixed uninitialized memory read in debug statement
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6203 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-03-10 22:29:25 +00:00
csoler
4c3905e257 simplified the chunk drawing code a little bit
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6177 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-03-01 23:41:42 +00:00
csoler
1fb605cfa9 fixed stupid bug causing streaming mode to get stalled
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6176 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-03-01 23:16:09 +00:00
csoler
4f1dda2ffb added new DL mode: Progressive. This is a random mode that ensures no more than 50MB of free space will be written in the file at once. This should effectively remove the lag when initiating a DL on a big file, while keeping enough entropy to ensure a good dissemination of chunks
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6164 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-02-28 20:42:01 +00:00
csoler
5b4739352e added dynamic menu for choosing download directory for files being transfered, and change the name of the destination file
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6156 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-02-27 16:59:16 +00:00
csoler
5646e29357 added auto-check of shared files after each download. If that causes too much activity, we will make this a option that in on by default
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6154 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-02-27 10:03:54 +00:00
csoler
c117078566 removed debug info
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6139 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-02-23 12:53:20 +00:00
csoler
b2214fcd46 removed #ifdef USE_NEW_CHUNK_CHECKING_CODE, since it is enabled by default now. Also removed the use of assume_availablility to put chunks or not in checking mode. This was inconsistent. As a side effect, cache files of size > 1MB get chunk-checked as well, which is good
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6050 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-12-27 21:16:33 +00:00
csoler
66207b81e5 - made the names consistent between ftdata, ftdatamultiplex and tests/
- added missing virtual functions in ftDataRecv
- setup initSSL instance as a static member of AuthSSL, instead of an external (does not change much except the init in rsinit.cc)
- changed p3PeerMgrIMPL to take SSL and PGP ids as parameters. This avoids calling AuthSSL and AuthGPG from the constructor => very helpful for tests.
- added random creation function in t_RsGenericId<>
- added functions setAuthSSL_debug() and setAuthGPG_debug() to manually setup the authSSL and authGPG objects to use. Used in tests.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6035 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-12-26 18:12:19 +00:00
csoler
bc65dd40c2 - Restored compilation of most tests (The part using previously named p3ConnectMgr is still to be done).
- moved ftSearchDummy and ftDataSendPair in tests/ft since it is only used there.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6009 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-12-17 23:05:25 +00:00
drbob
069b72e0b2 Merged branch v0.5-gxs-b1 into trunk (from -r 5351 -> 5995)
This brings a huge amount of goodness into the trunk,
but there is still a big chunk todo before it can be released.

 * GXS Backend.
 * GXS Services:
	- Identities.
	- Circles
	- Photos
	- Wiki
	- GxsForums
	- Posted.
 * SSH no-gui server.

See branch commits for more info.

To switch on GXS stuff, enable CONFIG += gxs
in both libretroshare.pro and retroshare-gui.pro



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5996 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-12-16 19:17:11 +00:00
csoler
63ceac29d2 suppressed bug due to not cleaning source lists. Would cause transfers to have inconsistent direct sources
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5860 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-11-20 21:42:21 +00:00
csoler
b2e97407b5 added dynamic addign of direct sources from file lists. Useful for channels. Is called once every 61 seconds.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5850 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-11-19 22:45:37 +00:00
csoler
d3a3efd492 added additional checking of incoming compressed chunk map, in case the data is currupted, which might happens with a corrupted ft_transfer.cfg file.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5816 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-11-13 20:13:09 +00:00
csoler
454daf1981 Iproved file list handling:
- Implemented correct cacheData send to clients usign constant subid value.
- At start, the association between peers and available file list is always recomputed
- overloaded cacheAvailable() and refreshCache() in FileIndexMonitor
- added callback in rsFiles to force re-generating cache items when group layout has changed
- force re-sent file lists when moving peers between groups in the GUI
(Fixes group leaking problem) Needs full recompilation of libretroshare.


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5813 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-11-12 22:51:27 +00:00
csoler
f61a50c5a6 fixed permission of drap+dropped files. all attached files get added to extra list, but with different permission flags depending on the client. From that, we compute sharing permissions : turtle, or direct transfer only
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5808 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-11-11 21:17:00 +00:00
csoler
ab26059570 added missing mutex in destructor of ftFileProvider. Probably responsible for some random crashes
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5802 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-11-11 10:29:03 +00:00
csoler
786177eaf0 Files being downloaded anonymously are declared as available with flag DIR_FLAGS_NETWORK_WIDE_OTHERS. Fixes bug that prevented swarming to happen
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5795 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-11-08 19:47:39 +00:00
csoler
5e913feee7 fixed bug of transfers not handled by turtle router. This was due to a change is values of flags. I added a test to update flags from loaded transfer infos to convert them properly. Just restart your RS and your transfers will perform normally.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5794 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-11-08 19:18:45 +00:00
csoler
a2f958b956 disabled flag DIR_FLAGS_NETWORK_WIDE_GROUPS for consistency reasons. We might extend it to rsCircles later.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-FileSharingPermissions@5784 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-11-06 20:46:56 +00:00
csoler
65146b77d9 fixed bug in permission check
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-FileSharingPermissions@5776 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-11-04 15:15:36 +00:00
csoler
997e833cc8 debugging tunnel handlign with permissions
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-FileSharingPermissions@5774 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-11-04 14:52:38 +00:00
csoler
d77c73adf4 loading/saving parent groups for directories.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-FileSharingPermissions@5770 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-11-03 15:25:25 +00:00
csoler
bd37e78884 debugged search functions
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-FileSharingPermissions@5760 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-11-02 14:25:35 +00:00
csoler
e753f22909 fixed flags conflicts
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-FileSharingPermissions@5758 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-11-02 13:52:29 +00:00
csoler
dc82cee700 First shot of file sharing permissions. Compiles, but needs some testing/debugging.
- added type-safe flags in retroshare/rsflags.h. This should be used to make new flags types in order to prevent mixing flags up in function prototypes.
- group handling is left to rsPeers. We'll move it to rsCircles later.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-FileSharingPermissions@5754 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-11-01 10:06:12 +00:00
thunder2
78edc7687e Fixed compile of libretroshare on Windows. The corrected pro files are not included.
Moved the includes of rswin.h from the header files to the c files.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5655 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-10-09 23:07:51 +00:00
csoler
170bbf4ce2 removed debug info
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5609 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-09-26 19:24:59 +00:00
csoler
1a8c9d9416 patched fttransfermodule to always fulfill the data suze request, even if the file creator returns small (old pending) chunks, or stops at a chunk boundary. This should improve data flow and hep achievign hight speeds on fast internet connexions
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5505 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-09-02 20:41:25 +00:00
csoler
24f8ee6222 Added dynamic choose of sources for chunk crc requests. Fixes the bug that would let
a transfer not finish if the original surce for a crc is not here anymore.

If you have a unfinished transfer do a force-check after restart to get back chunks that 
where still on verificaiton stage.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5315 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-07-19 20:52:04 +00:00
csoler
0d3d1ebc18 fixed bug preventing files < 1MB to terminate properly
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5240 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-06-21 19:24:14 +00:00
csoler
36198b7e6a Enabled full chunk checking code:
- unchecked chunks are not made available to swarming sources, not saved as done.
- force check now uses the simple method to put all chunks in checking mode
- force checked files can be cancelled (finally!)
- improved display (use red for active chunks, yellow for checking)
- cache file are not using chunk checking (assume_availability=true)
The code still contains the #ifdef. It should be removed soon if everything works ok.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5235 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-06-19 21:36:10 +00:00
thunder2
569d463f02 Optimized the fill of the up- and downloads in TransfersDialog.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5191 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-06-01 20:51:14 +00:00
csoler
c0e066598d switched chunk per peer and max chunk age to previous values, now that chunk cannot be slowed down by slower peers
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5165 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-05-13 20:08:59 +00:00
csoler
f5c345659a Improved multi-source file transfer in two ways:
- tunnels can borrow data chunks from only slower tunnels, to prevent blocking fast tunnels
- tunnels can handle up to 50 data chunks at once instead of 5
Multi-source transfers are generaly faster and more stable.


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5156 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-05-09 21:31:05 +00:00
thunder2
ec501c6d6a Fixed issue with lost downloads when RetroShare exits (or crashes) during the load of the file transfer items. The pending list was not saved.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5153 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-05-07 14:54:46 +00:00
thunder2
3718d6ecfa Removed usages of "std::istringstream" and "std::stringstream".
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5135 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-05-03 13:41:03 +00:00
thunder2
a6dfac2a37 Removed std::stringstream.
Removed not necessary include <sstream>.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5112 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-04-19 22:10:00 +00:00
thunder2
9aee68a2a9 Removed some std::ostringstream.
To be continued.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5108 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-04-18 00:00:59 +00:00
thunder2
83bd45caa4 Removed some std::ostringstream.
To be continued.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5103 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-04-14 22:38:24 +00:00
thunder2
3b85873313 Added patch from AC
- add missing includes "unistd.h" for compiling with gcc 4.7.0.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5096 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-04-12 23:29:39 +00:00
csoler
08a52dc369 fixed bug causing some transfers to never finish
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5063 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-03-30 19:33:58 +00:00
csoler
8f69251334 small improvements to the chunk checking algorithm
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5047 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-03-24 14:45:33 +00:00
csoler
633b66b1dd fixed missign delete in hash computation code
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5038 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-03-19 13:50:33 +00:00
csoler
c9f99c0be9 removed debug info
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5030 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-03-17 14:45:52 +00:00
csoler
456177ef11 fixed bug responsible for sending wrong checksums on windows systems
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5029 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-03-17 14:08:27 +00:00
csoler
889a2b2433 Added deferred check of chunks during file transfer. Chunk sha1 sums are requested to the sources and checked for downloaded data.
Validated chunks are shared to other peers. Force check is now very simple since it just turns all chunks into "needs checking" mode
and sums are asked to sources. Sources maintain a temporary cache of chunks. Since sums are requested sparsely, this should not 
affect the sources in terms of performance. We can still imagine precomputing and saving sha1 of chunks while hashing them.

For backward compatibility reasons, the following has been setup *temporarily* in this version:
- unvalidated chunks are still considered as already obtained, and are shared and saved
- force check has been disabled
- final file check is maintained
- in case of file fail, the old checking mode will be used.

All changes for next version are kept in the define 'USE_NEW_CHUNK_CHECKING_CODE' that will be made the default in a few weeks.
At start, I expect most chunk to stya yellow during download, until most sources are able to provide chunk hashs.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5019 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-03-15 19:55:43 +00:00
csoler
08d57e1681 fixed returned value not accounting for tests
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4964 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-02-19 15:04:56 +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
csoler
2d2b7230d1 added early sending of chunkmap request to newly added sources
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4950 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-02-16 22:58:30 +00:00
csoler
8b28fb2324 patch by AsamK to save finished/checking transfers
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4948 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-02-16 22:04:03 +00:00
csoler
2edb61758b Improvements to file transfer:
- corrected 2 potential flaws of swarming causing request of unavailable data (This should normally be taken care of on the server side!)
- improved swarming test code with fault simulation
- only ask CRC32 maps to peers that have a complete file.
 


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4947 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-02-16 21:10:46 +00:00
csoler
c4be65e0ab removed cache adding strategy to DL queue that was O(n^2). Now addign cache at the end of the queue
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4930 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-02-12 20:00:22 +00:00
csoler
f441f4a407 set max chunk inactivity period to 5 mins instead of 1 mins. Shoudl favor slow DLs. This is nw possible since missing bits will be re-asked regularly
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4925 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-02-11 15:26:04 +00:00
csoler
bd9cd22387 added RequestDirDetails(path,...) for file sync plugin.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4807 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-01-17 20:38:25 +00:00
csoler
1164c66d3a added new variable in config->transfers to allow reserving n slots to non cache transfers
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4775 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-01-10 23:07:53 +00:00
csoler
4ab319f29e Adjustment of some values for file transfer: some delays can be larger, now that chunks are shared between sources. This makes file transfer more stable:
- FT_TM_DOWNLOAD_TIMEOUT: 10 -> 20 secs (RTT limit of 10 secs is too low -> transfers in long tunnels kept switching between active and inactive)
- INACTIVE_CHUNKS_CHECK_DELAY: 60 -> 240 secs (Chunks are kept longer before beign cancelled, which is now affordable)
- MAX_TIME_INACTIVE_REQUEUED: 60 -> 120 secs.(Transfers a kept longer before being re-prioritized in queue)



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4707 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-12-03 13:39:37 +00:00
csoler
107f64c23f fixed bug asking data to deleted mTransfer
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4677 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-11-18 08:49:53 +00:00
csoler
4d9727f47a - fixed download priority handling. Proof-tested on multiple DL from the same peer.
- removed dependency of mRateIncrease into measured rtt -> would cause very slow transfers through long tunnels



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4671 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-11-16 20:30:20 +00:00
csoler
fa690de1d6 small bug fixes about CRC32 verification when the file is actually complete.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4662 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-11-04 21:29:51 +00:00
csoler
d43a131c04 Improved CRC32Map checking in several ways:
- servers now compute the map in a separate thread
- CRC32Maps are kept in cache for 30 mins
- CRC32Maps requests cannot be used to overflood a server anymore since their number is limited.
- Transfer modules now send keep alive packets to maintain tunnels when asking for a CRC32Map



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4661 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-11-03 23:18:00 +00:00
csoler
a9cb864717 corrected bug in CRC32 map cross-checking: only downloaded chunks would be checked.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4660 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-11-03 23:12:54 +00:00
csoler
e202a01862 fixed bug: re-allocation of local variable
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4659 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-11-02 13:58:33 +00:00
csoler
3c2a5e8f42 Added a filemapper class to store downloaded files sequentially on the HD. The mapper automatically
re-organises (e.g. defragments) data such that
- when the DL is finished, the file is in the correct order (no need to re-order it)
- during the DL, only the n*_chunk_size first bytes of the partial file are written, where n is the total number of downloaded chunks.
- the total amount of copy operations does not exceed the total size of the file. In practice, it's much lower.

That suppresses the lag when downloading large files due to writing isolated chunks in the middle of the file.

Next:
- integration into ftFileCreator
- load/save in ft_transfers
- retrocompatibility with existing transfers.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4658 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-11-01 14:20:51 +00:00
csoler
1fc8c5ef70 implemented slice sharing between peers.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4650 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-10-23 18:43:58 +00:00
csoler
c8ea41a4db corrected bug that would allow a direct friend to DL a file that is NETWORK_WIDE only, using direct transfer
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4648 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-10-21 22:25:18 +00:00
csoler
2173ee0d2e fixed bug with anonymous channels asking for friends to be sources
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4632 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-10-06 20:06:25 +00:00
csoler
15758578e0 fixed display of filename when an upload is a partially downloaded file
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4629 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-10-01 21:10:03 +00:00
thunder2
363af69254 Fixed utf8 issue in history manager.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4626 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-10-01 13:12:28 +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
csoler
97ed1d534f - removed calls to rsfiles->get{Download,Partials}Directory() in RsDiscSpace class, since it would trigger a call to ftController
- added a lock into ftTransferModule::recvFileData() (Crash reported by Costa due to storing data in a deleted transfer module)
- changed names of functions in ftTransferModules to locked_* when appropriate (helps debugging)



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4612 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-09-23 21:08:11 +00:00
csoler
dd474cfddf added chunk splitting in case part of the file transfer data does not come. Added strategy to ask again for missing data. The combination of these two cannot result into an infinite loop (as before)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4610 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-09-22 19:58:47 +00:00
csoler
0b33b6fc9d fixed bug fue to deleting ftFileCreator used by datamultiplex before asking datamultiplex to remove it!
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4606 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-09-15 19:33:58 +00:00
thunder2
35a059c44c Partial fix for ticket #146:
- set default of the signature checkbox in ConnectFriendWizard to disabled
- set the initial option for the download directory to network wide only
- set the default of a new shared directory to network wide


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4578 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-08-28 22:54:01 +00:00
thunder2
c6beee44ec Removed unused parameter warnings in libretroshare.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4558 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-08-12 13:42:30 +00:00
drbob
f6f721a492 Removed p3ConnectMgr. Replaced it with p3LinkMgr, p3NetMgr and p3PeerMgr.
Updated references in other classes.
 * Most classes need p3LinkMgr, and only use two functions: OwnId() and getOnlineList()




git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4416 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-09 18:39:34 +00:00
csoler
a0e6bf7b2a removed popup window for file copy error, and redirected the message to std::cerr, to save users.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4401 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-06 19:08:30 +00:00
thunder2
de87a89437 Added a name to the RsMutex class.
You can enable the debugging of the waiting time for a lock of RsMutex in rsthreads.h with
#define RSMUTEX_DEBUG 300
That means all locks waiting longer than 300ms are logged into the stderr.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4392 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-04 22:59:39 +00:00
drbob
b683e663d6 Merged Changes /branches/v0.5-peernet/libretroshare/:r4237-4358
Major changes are:
 * Improvements to tcponudp library to allow multiple UdpStacks / ports, with alternative recievers.
 * Resurrected the UdpStunner code, and improved it.
 * Added UdpRelay code.
 * Modified startup code and ssludp code to use the new tcponudp and add a stunner.
 * fixed buggy rs_inet_ntoa
 * fixed a bunch of apple gcc warnings. mainly for(;;); => for(;;) ;

These changes shouldn't affect libretroshare stability... those changes will follow!




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4359 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-06-29 18:02:44 +00:00
drbob
f475c4bdd6 Returned debugging to what it was!
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4334 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-06-25 12:41:37 +00:00
drbob
9e420ce08e Found the CacheTransfer Killing Bug... misplaced brackets!
I've also switched on the debug output so we can see when it happens.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4333 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-06-25 11:49:38 +00:00
drbob
a333b12618 Fixed the Missing Cache File bug.
* Added Old Cache Storage... so these can be retrieved.
 * Connected up the CancelCacheFile() -> FileCancel.

Other Changes.
 * Removed ipaddr = 1 bug (thought someone else had commited this earlier???)
 * added #ifdefs to remove debugging output in p3BitDht.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4330 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-06-24 15:10:52 +00:00
csoler
a2c91a7924 - Added basic infrastructure to plugin system in libretroshare and retroshare-gui.
- ported LinksCloud to a new plugin, and removed it from main sources

Next moves:
- add gui for managing plugins
- handle windows compilation



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4275 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-06-16 21:59:26 +00:00
csoler
f290c8eca4 Made the hash-cache more compliant with mounted/network drives:
- corrected bug that would wipe out the cache file every other start
- missing root directories are not discarded anymore, but kept empty, unless the user really removes them


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4271 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-06-15 20:03:26 +00:00
thunder2
72d9f352e3 Removed the difference of the separator for Linux and Windows.
Removed extra "/" of the filename (e.g. "E://") of the hashed file when sharing a whole drive.
Recompile of the gui needed.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4200 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-05-15 12:42:55 +00:00
csoler
993e0d225c improved strategy of cleaning unfinished cache transfers
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4171 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-04-25 14:20:57 +00:00
csoler
f110bad74c changed policy for canceling cache files: only inactive transfers get canceled now.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4160 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-04-17 16:22:03 +00:00
thunder2
bc113326e4 Fixed problem with utf characters in the %APPDATA% path on Windows.
Added function for opening files on Windows and Linux - RsDirUtil::rs_fopen.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4124 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-04-03 23:11:38 +00:00
csoler
6c2bdbe214 - added some optimization to RequestDirDetails internal functions
- improved sorting/selection in shared files flat mode
*W* Needs full recompilation.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4121 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-04-03 19:59:12 +00:00
csoler
ccfee2d8e4 forgot this (uint32_t->int)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4114 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-03-31 19:19:30 +00:00
csoler
451c75813d - added a missing pthread_join in file checking, that eventually caused a leak of thread resources
- changed the order of check in tick() to allow cancelling a file that is being checked
- removed the hash step from mutex protection



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4113 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-03-30 22:35:09 +00:00
csoler
7c6682b89f added a checkbox in settings for tuning auto-check of shared directories
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4107 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-03-28 21:52:21 +00:00
thunder2
af4dd635e3 Removed member ftController::mShareDownloadDir and calculate the value from the shared directories.
Combined the two methods for share and unshare of the download dir.
Added share incoming directory to the QuickStartWizard.
Recompile of the GUI needed.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4089 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-03-08 20:05:36 +00:00
thunder2
127eac1118 Fixed utf8 issues when the partial or the download dir is set to a utf8 dir.
Use the native dialog for selecting the shared folder.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4083 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-03-06 20:19:16 +00:00
thunder2
0a42b7899e The working (hashing) thread FileIndexMonitor is now stopped when RetroShare is closed.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4072 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-03-03 23:30:08 +00:00
csoler
1489d85ce9 forgot to commit fopen64 fix to this file
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4059 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-02-25 08:02:12 +00:00
csoler
e39a04ee7f last fix to missing ftello64 calls (hopefully)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4057 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-02-24 22:44:41 +00:00
csoler
827dbd8cf3 added a memory management class for small objects.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4046 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-02-20 21:36:21 +00:00
thunder2
db19db7e60 Optimized some small things in TransferDialog and SearchDialog.
Changed the parameter of the constructor of ftFileCreator and ftFileProvider and some methods of ftTransferModule from "std::string" to "const std::string&"

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4045 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-02-20 00:59:47 +00:00
csoler
9de341953d removed duplicate hashing function. Now the hash buffer is always 512 bytes.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4038 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-02-14 19:59:06 +00:00
csoler
c7b28dfb7d added load/save of max simultenous downloads
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3978 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-01-23 14:55:57 +00:00
notdefine
35c97a6f65 Revert Changes
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3962 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-01-10 15:30:37 +00:00
notdefine
d9d996c587 Don't move priority files to the end of the queue, when partner peer is not reachable. set the queue priority to +1 in the queue, so they will be first resumed after one of the lower priority downloads finished
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3961 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-01-10 14:58:49 +00:00
csoler
c9911694ff corrected a bug that caused file descriptors to never get closed. Adding some tracing comments.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3958 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-01-08 23:27:33 +00:00
thunder2
28b4534fdf Removed unnecessary variable "ownId" in ftController::FileRequest.
Optimized parameter of rsForums from "std::string" to "const std::string&". Recompile of the GUI needed.
Cleared childTS in RsDistribMsg::clear.


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3949 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-01-04 19:46:27 +00:00
csoler
40efe19efa added chunk request info, and chunk download info. Corrected bug displaying speed for stalled transfers. Warning: needs full recompilation
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3935 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-12-26 10:58:02 +00:00
chrisparker126
2f559dae96 removed channel delete feature
added optimisation suggestion with load/savelist

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3920 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-12-18 19:35:07 +00:00
csoler
f5bfc8c92a changed a bit the file transfer strategy. To be tested further.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3898 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-12-07 17:09:21 +00:00
csoler
9ec813b4b8 corrected quite subtle bug in ftdatamultiplex, due to deleting a filecreator that is also a file server.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3879 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-29 20:46:21 +00:00
csoler
90211debe9 added missing mutex (caused memory error)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3878 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-29 17:21:51 +00:00
thunder2
fc08d1171f Added simple toaster for download complete.
Added new icon in MainWindow and systray icon for existing completed downloads.
You can enable/disable the toaster and the systray icon in NotifyPage.
Recompile of the GUI needed.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3868 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-25 00:20:25 +00:00
csoler
d83a7118fa removed potential cross-lock situation (reported by Valgrind)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3855 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-22 21:15:21 +00:00
csoler
34a3fc4ea8 removed useless include
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3854 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-22 21:01:54 +00:00
csoler
b94e4376a4 only assume availability for cache transfers. All other transfers now use ChunkMaps
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3853 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-22 20:57:53 +00:00
csoler
b2b67cfecc added comment
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3839 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-21 13:35:10 +00:00
csoler
4e2e8f72b3 corrected missign return value
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3805 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-16 20:58:26 +00:00
csoler
1e28183c2d changed minimum chunk size to 1KB/s and max desired rate to 10MB/s
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3796 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-14 21:38:12 +00:00
drbob
7203229126 Cleaned up Transfer debug, now that we've found the windows bug.
* new uniform #define DEBUG_TRANSFERS to switch on packet timings.
 * switched off by default.
 * enabled BinData printing again.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3785 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-13 11:46:17 +00:00
csoler
ce75b486f4 corrected bug due to uninitialized memory read
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3781 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-12 15:21:49 +00:00
drbob
06273fa775 Hackish changes to debug Windows Transfers...
Committing these so others can run tests.
Most of these changes will be removed once the problem is fixed!
 * Fixed formatting of various serialiser item::print() fns.
 * Disabled printout of TlvBinaryData - data.
 * added AccurateTimeString() function to util/rsprint.cc
 * print serialise / deserialise of FileRequest & FileData + Timestamps.
 * added print + timestamp in ftFileProvider::getFileData()
 * #define TRANSFER_DEBUG to isolate these changes.
 * enabled debugging in fttransfermodule.cc



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3779 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-11 20:51:17 +00:00
csoler
9397491634 fixed default chunk strategy value (uninitialized)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3778 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-11 19:36:39 +00:00
csoler
c00e11ed2b switched random chunk strategy to true random
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3777 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-10 22:05:34 +00:00
csoler
f2406d4e57 improved random chunk strategy, to limit cluster effects on files partially downloaded in streaming
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3764 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-08 22:09:43 +00:00
csoler
630156a5e8 added an optional cache for hashes, so that hashed files are remembered for some days.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3729 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-31 20:35:31 +00:00
chrisparker126
618cc702a8 added file moving utility to rsFile interface to channels file save consistent
msgs now save from field in received msgs

also allowed user to delete file added in createChanMsg dialog


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3727 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-31 19:29:26 +00:00
thunder2
ab5b2a3851 Optimized parameter "hash" of method RsFiles::FileDetails from "std::string" to "const std::string&"
Removed compiler warning of FileEntry.
Recompile of the GUI needed.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3703 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-27 20:01:31 +00:00
csoler
af8ad4e862 removed the "emergency shutdown" feature in tickPeerTransfer(), that would stuck some transfers on the lowest rate 128 B/s. On my tests this emergency shutdown is never needed.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3676 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-16 21:09:48 +00:00
csoler
630e7dfe6b code cleaning. Removed debug info
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3675 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-16 16:49:35 +00:00
csoler
c8f6770b7d moved the callback information into flags in ftFileControl. Side effect: code is simpler, channel transfers are saved in a backward compatible way
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3674 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-16 15:21:37 +00:00
csoler
8369d42600 corrected a bug in chunkmaps that affected file creators being providers at the same time, which could corrupt data. Added some debug info to chunk maps.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3673 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-15 22:12:29 +00:00
csoler
82057a5f69 corrected initialised memory read
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3645 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-07 21:31:42 +00:00
thunder2
d31cef0f11 ChannelFeed:
- Sort the ChanMsgItems of the channel by date

ChanMsgItem:
- Fixed adding all files (SubFileItem) again by pressing the unsubscribe button (only in Friend Storm)
- Enable unsubscribe button only when channel is subscribed (only in Friend Storm)
- Fixed adding files with umlauts (utf8) on Windows
- Enabled Download and Play button in ChanMsgItem, when they are enabled in the SubFileItems

ftServer:
- Added the method alreadyHaveFile for use in the GUI - recompile of GUI needed

SubFileItem:
- Added state strings like LOCAL, REMOTE, ERROR, ... for translating


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3614 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-05 20:39:14 +00:00
csoler
d71dd2889d added safety check to ftChunkMap call to p3turtle, mainly for tests to run
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3582 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-01 20:07:29 +00:00
csoler
978528824b added missing dummy class definitions for linking test programs
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3580 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-01 19:52:24 +00:00
csoler
47b48769e4 simplified the code in the post download CRC check routine and removed a potential bug.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3574 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-09-30 21:02:37 +00:00
thunder2
fff12a58c6 Changed the reference pointer from last commit to const.
Need recompile again, sorry.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3510 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-09-17 19:21:14 +00:00
thunder2
ed737e2c9f Fixed umlauts (utf8) in Windows. Changed some parameters to reference pointer. Added virtual folders to the lib.
Recompile needed.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3509 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-09-17 18:27:30 +00:00
csoler
8ee92483ee added missing return which would create ghost cache self-transfers
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3504 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-09-15 19:53:58 +00:00
csoler
d41089b30f suppressed debug info
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3503 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-09-15 19:48:49 +00:00
csoler
301b7daa88 changed insertion in queue for cache files: these are always placed before the first non cache file, hence giving cache files a higher priority over normal downloads.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3502 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-09-15 19:48:13 +00:00
csoler
4ea6b0b31f corrected bug about missing da39... null file
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3489 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-09-14 21:24:51 +00:00
chrisparker126
9e86265f91 moved test sources to test directory and deleted a few dead files , created new util test directory.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3396 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-08-25 19:54:28 +00:00
leander-256
4bb4fc11e2 This intimidating patch renames libretroshare/src/rsiface/ to
libretroshare/src/retroshare/

All the relevant headers have been modified to reflect that change.

This allows installation of libretroshare on a system, headers will
be put in $WHEREVER/retroshare/ and we keep the ability to compile
against them, be it on the system or in the SVN tree.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3342 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-08-06 09:40:23 +00:00
csoler
1069ed0c58 - corrected 1 bug in serialisation of CRC32Maps for peer transfer
- corrected 1 bug (missing hashing thread deletion on failure)


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3321 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-30 21:01:51 +00:00
csoler
012808ea00 - Implemented CRC32 map traffic through direct downloads
- replaced the findItems() call into a hand-written search (this was causing a rare bug in displaying downloads)


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3318 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-29 21:07:07 +00:00
csoler
81203b3cfd - modified ftFileProvider so as to keep multiple client peers per instance
- updated TransfersDialog to display this info correctly


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3316 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-27 16:05:21 +00:00
csoler
cee8600a93 - implemented bidirectional exchange of chunk maps for direct downloads, to allow showing proper completion of transfers from direct friends.
- moved the direction flag upward in the pipeline (ftDataSend instead of p3turtle)




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3313 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-25 19:04:31 +00:00
csoler
8bfc74485a First implementation of per-chunk CRC32 check. This is triggered
- by the right-click+Force Check on files.
- when a global hash on a downloaded file does not match the announced hash.

When a CRC map check is ordered, the CRC map is requested to one of the sources for the current file download.
When received, all downloaded chunks are checked w.r.t the reference CRC and marked as not done if the CRCs do not match.
The exchange of CRC32 map and requests has been tested, as well as CRC map checking during download (force check).

To be implemented soon:
    - caching of CRC32 maps (although these are fast to compute)
    - CRC32 map packets for normal downloads. For now these work only for turtle tunnels.
    - handling of errors if the CRC never comes. For now, the download will stay stuck in "Checking..." mode.

So, don't play too much with the force check feature for now...





git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3310 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-21 23:14:10 +00:00
drbob
648e15bcf7 Found cause of OSX network resets / lost connections: inet_ntoa is not thread-safe.
* Added thread-safe rs_inet_ntoa function (util/rsnet.cc)
 * Switched all calls to this function (most of the changes)
 * Modified getLocalInterfaces() and getPreferredInterface() to avoid string conversions.
   - NB: Modified windows functions too, but unable to test (hope it compiles!)

Also:
 * Added  EVP_CIPHER_CTX_rand_key() replacement function for old versions of SSL (pre 0.9.8)  (for OSX 10.5)
   - NB: This code should be reworked to remove these calls anyway.
 * Updated tests/pqi to handle above changes.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3281 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-10 20:34:03 +00:00
csoler
fbd8a33db0 added display of checking stage in GUI (at end of transfer). Gave names to the states in ftTransferModule. Added a flag for ForceCheck files (not functional yet)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3274 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-09 21:04:29 +00:00
csoler
458a8faf70 - implemented post-download hash re-check. For now, if the hash does not match, the download is canceled, but in the near future, per-chunk comparison wil occur
.
- corrected a bug that caused file copy error: a closeFile() was missing when the file is complete. Because of delays in fwrite, the file would not be always co
mplete, nor exist at all for small files (e.g. cache files), which in the later case caused the copy error.

Warning: needs a make clean in libretroshare to recompile.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3261 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-06 05:04:11 +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
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
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
leander-256
9033e4fa56 Bugfix on file manipulation
Corrects wrong logic when using Win32 API for handling the filesystem, Win32 functions return 0 for an error while POSIX functions return 0 for a success.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3146 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-16 16:18:08 +00:00
csoler
0d14351b8a Ported branch commits:
3099: libretroshare/src/tcponudp/udplayer.cc 
      libretroshare/src/tcponudp/udplayer.h 	
      libretroshare/src/util/rsnet.cc 	
      libretroshare/src/util/rsnet.h

	moved operator<<(ostream&,sockaddr_in) to rsnet.h, as it is used at
	different places

3100: libretroshare/src/util/rsdiscspace.cc
	suppressed debug mode

3101: libretroshare/src/serialiser/rsdiscitems.cc

	put correct (i.e. non conservative) size for RsDiscReply packets

3102: libretroshare/src/services/p3disc.cc

	Made a pass on the code in p3disc. Corrected some bugs:
		- suppressed an unwanted return in packet treatment
		- prevented sending info to a peer about itself
		- changed askInfoToAllPeers() such as not to discard info
		  from peers with NODISC flag (because we especially need
		  info for these)
		- enabled receiving p3disc info even if p3discovery is
		  disabled. Indeed, disabeling p3disc is a measure of
		  protection, so it should limit the export of p3disc info,
		  not the import.
		- removed test discarding info about dummy friends, because
		  it is useless
		- don't discard info about peers that have the NODISC flag
		  (meaning that we especially need info for them)
		- added safety check about received GPG keys. Before we
		  relied on this test being performed by
		  p3ConnMgr::addFriend()
		- added some debug info

3103: libretroshare/src/ft/ftcontroller.cc
	removed debug info



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3104 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-10 13:42:49 +00:00
leander-256
21efccfdd6 Memory leak and compiler warnings fixes:
- memory leaks in pqi/cleanupxpgp.cc , 2 new char[] => 2 delete[]
- reordering some constructors' initializing order
- char* myString = "foo" constructs must be prefixed by "const"
- using size_t for variable types when dealing with STL


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3079 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-07 01:47:15 +00:00
csoler
7b0757c4bc Merged branch commits:
3068: added verification for file size computation (bug correction)

3069: set heartbeat values to intermediate values

3070: suppressed uninitialised memory read

3071: automatic removal of file lists from deleted peers, at restart (After
      double check that this does not alter exchange of file lists in any way)



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3072 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-05 19:16:39 +00:00
thunder2
334c9b61d3 moved rsGlobalShutDown from MainWindow::doQuit to main
rsGlobalShutDown now cleans the threads and some memory on exit

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3028 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-29 15:14:25 +00:00
csoler
b80aef1228 Suppressed the possibility for browsable only files to be searched by hash from turtle router.
This avoids that an attacker that captures a broadcast hash request can also ask for the file.

This needed to add back explicit sources in SearchDialog and private chat transfer. I dynamically search
for sources in file lists just before calling FileRequest.

When RS links anchorClick() will work properly with Qt, we can remove the search flag "EXTRA" from the
tunnel digging in p3turtle.cc, otherwise, people having this bug can't transfer files in private chat by
copy+paste of a RS link.
    
	Also:
	    - added missing mutexes in search requests into fimonitor.cc
		- suppressed some debug info in connect manager
		- added check for write fails when dumping config files



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3027 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-29 13:17:09 +00:00
csoler
a3a75b7aea Ported branch commit 3017:
- added failure tests for fwrite. Some where missing.
	- added a test against the IP 1.0.0.0, which pops up on MacOS (when the peer is not connected to the internet?)
	- put some additional debug messages.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3018 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-28 14:00:35 +00:00
drbob
d93c56a355 * Switched on Turtle transfers for Channels,
* Enabled srcIds from secondary file transfer requests to be used.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3002 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-25 20:42:56 +00:00
csoler
0634e461fb implemented a safety check for low disc space, and safe drop of disk access if too low
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2968 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-21 20:49:48 +00:00
csoler
f7305de302 added a workaround for a bug in the cache system that asks for files of size 2^64-1. This results into a division by zero in ftChunkMap. Bu the time I find this bug, the workaroudn should avoid crashes.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2932 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-17 21:05:28 +00:00
leander-256
b30056e17f This patch allows Windows users to share files and folders with "exotic" characters.
The problem was that libretroshare handles files in UTF-8 but Windows's ANSI/POSIX C functions automatically assume that the char* parameters are encoded with the system's code page. There is no way to set that code page as UTF-8. So now under Windows the code translates the file name to UTF-16 before feeding it to one of the Unicode functions (they are usually prefixed or suffixed by 'w'). Please note that it is not very efficient.

Furthermore, Windows does not provide a Unicode version of opendir/readdir/closedir, so it was necessary to use FindFirstFileW/FindNextFileW/FindClose which has a different behaviour as well as different structures. The FolderIterator class was created in order to mimic the Unix way of traversing folders contents. Hence the algorithm is unchanged and the systems differences masked.

As it was necessary to use some functions from the Windows API, <windows.h> had to be included in a few files were it didn't appear before, creating macros and #define conflicts. In order to solve them, util/rswin.h must be included first in a file (if necessary). Otherwise the preprocessor will fail on purpose to avoid the code being compiled with different _WIN32_WINNT values.

As another side-effect, rstlvutil.h and rstlvutil.cc have been removed from libretroshare.pro file. They are only used by testing units and include util/utest.h which defines a macro FAILED that already exists in <windows.h>. I don't know if unit tests are still in use and I don't plan on coding often on Windows, so I'll leave that as an exercise (hot potato?) to a motivated fellow Windows programmer.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2924 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-16 23:26:45 +00:00
csoler
c8576d98ad added missign lock in ftcontroller. This is likely to correct a bug.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2920 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-16 21:21:41 +00:00
csoler
48556396ee added a check to avoid (possibly rare) data races
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2901 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-14 11:29:15 +00:00
thunder2
b242b73f31 Memory leaks:
- ftController::copyFile -> buffer and file pointer leaks in case of error
- PeersDialog::insertSendList -> new QTreeWidgetItem for all online peers, this function is not ready yet
- PeersDialog::insertPeers -> gpg_item = new QTreeWidgetItem(0); in case of no more accept connection
- pqissl::reset -> missing SSL_free of ssl_connection

Missing return:
- IntroPage::nextId


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2891 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-12 20:10:22 +00:00
csoler
c87844277a implemented a short circuit to local cache transfers. This saves a large number of file descriptors, and improves reactivity of the software
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2876 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-09 13:52:05 +00:00
csoler
03d0058ca4 suppressed unused files
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2865 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-08 14:43:55 +00:00
csoler
6fee3eeeb7 corrected bug about persistence of default chunk strategy
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2817 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-30 21:07:21 +00:00
csoler
08065b4298 ported branch v0.5.0 commits 2623, 2624, 2626, 2633, 2634, 2643, 2644, 2646, 2651 and 2654 to trunk
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2660 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-03-28 20:46:45 +00:00
csoler
b000245ef5 merged branch 0.5.0 commits 2576, 2579, 2581-2583 into trunk
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2592 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-03-21 21:07:12 +00:00
csoler
f8d6590952 ported v0.5.0 commits 2561,2562 and 2574 to trunk
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2575 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-03-17 15:34:36 +00:00
csoler
cc17744ee3 ported branch v0.5.0 commits 2529 and 2544 to trunk
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2545 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-03-15 12:57:08 +00:00
csoler
c22799b996 moved removal of sources off turtle mutex to avoid cross-lock. Added a closeFile() call when moving files out of the queue
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2523 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-03-12 19:39:23 +00:00
csoler
5f7486f160 added proper dynamic suppression of sources from chunkmap, and updated the gui
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2498 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-03-07 14:42:13 +00:00
csoler
144669e672 suppressed debug msg
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2494 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-03-06 23:37:42 +00:00
csoler
9e469d8baf Added proper dl queue behavior
- suppressed old DwlQueue class
	- turned mDownloads into a list of pointers to allow easy cross-info update between queue and std::map of downloads
	- added queue functionality for moving files top/bottom/up/down
	- added the necessary functions in rsFiles

Put back display of exact sizes in FileTransferInfoWidget

Suppressed some warnings.

**Warning**: this commit requires a make clean.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2493 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-03-06 23:29:47 +00:00
csoler
e3f2f66702 suppressed bug in file transfer while removing inactive chunks.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2468 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-03-01 20:46:29 +00:00
csoler
e4a508ab5b warning suppression
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2411 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-23 22:30:51 +00:00
csoler
3d11b15490 warning suppression, removed unused p3portservice from compilation
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2408 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-23 22:17:06 +00:00
csoler
5633e7b5f4 made complete files stay in the download list
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2373 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-19 20:36:47 +00:00
csoler
851e9069f6 corrected compled completion and file progress issues
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2356 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-17 22:10:12 +00:00
csoler
154ef63474 removed potentially harmful code. Warning: needs make clean in libretroshare
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2335 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-15 20:44:37 +00:00
csoler
799cfca972 added missing scope guard
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2333 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-15 18:03:27 +00:00
csoler
5926c79822 corrected bug in file completion
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2301 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-13 20:42:49 +00:00
csoler
b0f7275ac0 suppressed uninitialized memory read
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2277 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-10 21:32:45 +00:00
csoler
9753b47576 suppressed bug in creation of cache directories
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2275 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-10 20:32:21 +00:00
csoler
365ef569dc suppressed some uninitialised memory reads
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2267 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-09 20:31:49 +00:00
defnax
96caa40895 fixed windows compile
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2241 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-08 17:38:57 +00:00
joss17
6f1e4623ab further log cleanings
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2239 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-08 14:06:43 +00:00
joss17
bf67301d71 remove a maximum of debug outputs for the release
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2232 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-07 21:28:40 +00:00
csoler
3621ef4a95 resurected error msg window. Added a check for file hashes in FileRequest() to detect issues with badly formed file links
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2230 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-07 18:10:12 +00:00
csoler
2521431afa reverted last change on packet size. Seems to screw the convergence of speed. We need to tweak that a little more
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2221 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-06 22:27:44 +00:00
csoler
93aa334219 setup chunk slicing in FT to 32K instead of 8K. Seems to work perfectly, and faster, since TCP slicing is less likely to waste packets when the size is not a multiple of the TCP slice (1500 bytes?)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2210 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-05 23:10:32 +00:00
csoler
e08d13397a fixed a completion issue in FT
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2174 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-02 22:15:42 +00:00
csoler
b592bdac62 added return statements is functions that missed one
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2137 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-27 08:24:39 +00:00
csoler
7fd5c7ad4b restaured priority queue methods, and made better context menues.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2135 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-26 23:25:00 +00:00
csoler
a70b106005 - added NETWORK_WIDE flag to remote dir model download
- added file priority strategy based on which files are requested first. This provides:
	- equal file speed for files with equal (source,priority)
	- effective priority speed for file of same source but different priority
- removed state variable load/save from turtle, as it's not needed anymore (FileRequest re-opens tunnels as needed)
- manage availability per peer instead of per file type: direct peer ids always assume file availability, while turtle tunnels don't

I still need to make the download queue work, and code this gui for it.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2133 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-26 20:40:21 +00:00
csoler
0e7f9df638 made contextual menus in FT more contextual, added info about transfer type and chunking strategy, load/save of transfer flags
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2114 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-22 23:23:37 +00:00
csoler
e2b807aad7 added regular cleaning of inactive chunks and slices, so that they can be treated by a different peer
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2102 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-21 12:31:00 +00:00
joss17
f481dbef59 add include for latest gcc. Comment usleep fonction in tou_net.h
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2101 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-20 22:02:43 +00:00
csoler
3afd4442c9 forgot flag in ::alreadyHaveFile()
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2059 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-16 23:51:46 +00:00
csoler
e70e995894 added functionnality to complain when a download is initiated over a file already in download, or in the HD
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2055 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-16 15:42:26 +00:00
joss17
9976b80566 remove the ssl cert storage. Big rewrite of ssl cert and friend management
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2017 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-13 21:22:52 +00:00
joss17
9d53481946 make it run
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2003 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-13 21:01:06 +00:00
joss17
a0a64fb588 make it compile
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2002 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-13 20:58:58 +00:00
joss17
c23407cae3 get rid of p3authmgr
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2001 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-13 20:56:55 +00:00
csoler
96147a9734 added flags to file request: RS_FILE_HINTS_ASSUME_AVAILABILITY to not wait/ask for chunk maps. Used for cache transfer and also whenever the turtle traffic is not involved, such as chat file exchange, and RS_FILE_HINTS_NETWORK_WIDE to force using turtle routing for traffic. Also moved turtle tunnel start/stop orders from ftServer to ftController
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1995 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-11 22:38:18 +00:00
csoler
f02b009d7b fixed win32 compilation
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1994 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-11 20:10:04 +00:00
csoler
cfaaec31c7 - Implemented chunk-based file transfer from partial sources. This in particular means:
- exchange of chunk availability maps from different peers
    - correct handling of what is available to which source before asking the data
    - correct display of chunks in the progress bars
    - generalised the use of compressed chunk maps
    - removed the size parameters from the hash search functions
   
- In addition:
    - suppressed a number of per-value transfers of std::string
    - improved the FileTransferInfo Widget, to show some additional info

Still to be done:
    - chunk map exchange for non anonymous traffic (easy)
    - improve accuracy of completion for uploads (for now it's a integer number of chunks)
    - check compilation on windows




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1993 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-11 16:00:42 +00:00
csoler
b83e894640 - added a generic RsItem to the turtle router and the methods to route it. This makes the code much more elegant.
- suppressed a cross mutex lock bug that happened rarely while digging tunnels
- changed FileDetails in ftServer so that it's now possiblt to search for hashes of files being downloaded
- improved the search code in ftdatamultiplex
- added some comments to the turtle code



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1964 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-02 21:30:19 +00:00
csoler
f4a2eaecce - implemented a visualisation for currently handled chunks, availability maps, and transfer info
- implemented transfer protocol for chunk availability maps between peers (not enabled yet though)
- suppressed rsiface directory from retroshare-gui
- moved notifyqt.{h,cpp} to gui/

next moves: 
	- send availability maps to clients; 
	- connect turtle search to unfinished files;
	- test multisource download with unfinished files.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1939 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-12-28 21:11:00 +00:00
joss17
35631d180e add ifdef for debug logs
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1880 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-12-14 18:10:34 +00:00
joss17
3cac0c1ce9 add ifdef for debug logs
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1879 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-12-14 18:10:20 +00:00
csoler
b6c048a5fd Implemented load/save of chunk maps for current downloads.
The side effect is that even when stopped, downloads show the correct downloaded size (up to the size of one chunk).



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1865 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-12-10 22:55:27 +00:00
csoler
4d190963cf windows compilation fix
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1864 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-12-09 12:42:31 +00:00
csoler
25a09900e9 - Added a ChunkMap class responsible for allocating new chunks to be downloaded, according to
- a given chunk strategy
	- the availablility map of each source 
- Integrated this into ftFileCreator
- added gui menu in file transfer+right click to change the chunk strategy: streaming vs. random

Next step: 
	- loading/saving file downloading state and availability map
	- displaying chunk details in the selected transfer tab (e.g. list of currently worked chunks, and their current downloading completion)



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1863 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-12-08 22:29:52 +00:00
csoler
426fc06938 forgot to add these two files
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1839 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-11-19 08:35:11 +00:00
csoler
e88d2c1928 Added consistent display of chunk map
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1837 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-11-18 23:02:37 +00:00
csoler
506f14eb2f - Added a parent page widget (class RsAutoUpdatePage) to handle auto-update. The page updates using a timer, only wh
en visible, and each time it gets showed. I already made some RS pages derive from this page.
- Modified and renamed the taskGraphPainterWidget to display info about currently selected file transfers. For know, it only shows file chunks info, but we should use it to display additional info about the transfer. Warning: in its
 current state, only fake chunk info is displayed.
 - Suppressed p3files.h, because it is not used.

 Remains to do (in order):
 - Implement a chunk map class in ft/ to properly manage which chunks should be downloaded 
 - Display correct chunk info by requesting the transfer's chunk map
 - Add check-sum verification of chunks
 - allow RS to import a partially downloaded file by force re-checking chunks
 - Add chunk map exchange from file source peer id to file destination peer id.
 - Manage chunks from different peers.
 - Allow search (turtle search) for partially downloaded files 



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1832 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-11-17 12:45:06 +00:00
csoler
95a577ccd0 Integrated turtle download to all kind of user-requested downloads
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1625 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-09-09 20:14:43 +00:00
csoler
2597e6a61e added large file support
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1575 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-08-29 18:55:13 +00:00
alexandrut
10d44a15b8 -add support for searching and display directories
-downloading directories from search dialog not implemented yet
-needs more code clean and beautify the directory tree

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1566 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-08-25 20:49:50 +00:00
csoler
3c09b4f2d2 added regexp search to turtle router
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1564 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-08-25 12:04:43 +00:00
csoler
2807a778e8 ensured early creation of cache directories to avoid "Cannot copy file" bug
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1521 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-08-11 20:00:08 +00:00
csoler
cb5f22a5c6 Share Flags
- now, only files with the NETWORK_WIDE flag are searchable by turtle hopping.

	Next move:
	    - integrate turtle search in default gui.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1512 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-08-10 19:44:45 +00:00
alexandrut
339fcd53ed add persistence to download queue
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1510 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-08-10 19:01:27 +00:00
csoler
792ddf1d25 Share Flags
- own directory browsing is now done through FileIndexMonitor. This allows:
	- to browse shared directories independently of their flags
	- to update files as they get hashed (yeah!)
- still to do:
	- turtle requests should respect the share flags



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1507 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-08-09 20:00:25 +00:00
csoler
6928b3c426 fixed core dump (double delete) when getFileData fails
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1504 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-08-09 15:55:31 +00:00
csoler
fc6a86b592 forgot to commit this one.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1488 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-08-04 09:19:32 +00:00
csoler
f9dc3b223b Started implementing flags to handle the sharing mode.
What works:
- the gui shows the flags in ShareManager
- the flags are loaded/saved to ft_shared.cfg and passed on to FileIndexMonitor
What does not work yet:
- the flags are not accounted for yet by FileIndexMonitor

In addition:
- simplified the directories dialog in Preferences, so that it calls the ShareManager instead of dupplicating the directories management 
code that becomes larger.
- setup the ShareManager to be a singleton, so as to coherently call it from different places.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1486 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-08-03 19:43:52 +00:00
drbob
a023a0bfcd Major change to the way certificates are stored now defaults to ~/.retroshare/SSLID/
* supports Multiple Accounts on same computer.
	* Enabled libretroshare tests using Makefiles.
	* restructured RsInit functions: Config Data is now private.
	* switch OpenPGP on by default (added #define to rsinit).
	


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1451 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-07-30 21:27:47 +00:00
alexandrut
3394239297 let hash name for partial files, use qfile link instead
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1448 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-07-28 15:29:21 +00:00
alexandrut
e68d874406 *redesign of dwl queue - dwls will be enqueued and picked from there;
*changes to display the dwl queue in the transfers dialog 

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1447 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-07-28 10:21:19 +00:00
csoler
c9467a2bfe this is a fix for the file download problem. It does not correct the wrong chunk size, but it checks that the malloc returns something.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1442 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-07-27 20:31:56 +00:00
alexandrut
e69351dda9 small changes
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1434 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-07-26 19:00:16 +00:00
alexandrut
c7ecf8c46d add implementation for priority download queue
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1432 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-07-26 15:00:29 +00:00
alexandrut
e7b42238cb use real name instead hash name for partials for preview; hope to work now
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1400 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-07-21 21:37:51 +00:00
alexandrut
f98d4f080b added extension for file names in partial dir, so them can be previewed in windows
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1390 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-07-18 12:23:34 +00:00
alexandrut
990ed277bd share of incoming directory by default
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1359 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-07-12 13:22:31 +00:00
csoler
2ff271f810 added missing continue which caused sigsegv
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1300 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-06-15 07:28:23 +00:00
csoler
51eb8b8eaf added removal of turtle handling when canceling/ending a file transfer. next step: Turtle download is now ready for gui integration
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1299 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-06-14 19:34:22 +00:00
alexandrut
9b7d486d6c bug fixing when storing incoming and partials directory
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1296 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-06-11 21:41:42 +00:00
csoler
211acc6adf suppressed file download memory leak
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1294 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-06-11 08:09:08 +00:00
csoler
48218e98cb turtle tunnel management
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1289 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-06-03 18:47:14 +00:00
csoler
1046bdd846 First commit for the turtle download. It works without perturbating RS traffic, but still needs some (internal) smoothing
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1275 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-05-26 21:42:45 +00:00