Commit Graph

924 Commits

Author SHA1 Message Date
csoler
9ff59e4722 fixed win32 compilation issue
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2949 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-19 11:37:17 +00:00
csoler
0cc8fcdbac improved the security of size determination for file lists (suppresses a small bug that caused a chain reaction ending in crash of client peers when downloading file lists)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2945 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-18 21:15:22 +00:00
chrisparker126
47ba7c0df2 makes sure channels grp folder is created immediately once a channel is created
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2935 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-17 21:21:47 +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
chrisparker126
105e617596 fixed abug i introduced, copy of grp icon data made in p3distrib
- it was previously corrupting group keys
 added dynamics size to grps created 
  - previously limited to 16000 bytes

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2928 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-17 14:33:16 +00:00
chrisparker126
7cd6103ff7 intialised channel info file count correctly
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2927 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-17 14:27:05 +00:00
leander-256
913789b972 This is a patch for the previous patch *facepalms*
I got confused somehow between the different versions of my modifications and Linux/Windows, anyway it should work now.


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2925 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-16 23:59:39 +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
leander-256
e49cc6552c Minor fixes
pqi/authgpg.cc:
- remove French comment (with nasty non-unicode characters)
- use std::cerr instead of fprintf

tcponudp/extaddrfinder.cc:
- initialize correctly the sockaddr_in, former code wouldn't pad sin_zero
  (which is required by the standard)


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2909 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-14 18:50:20 +00:00
chrisparker126
27895d1781 added group icon support
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2904 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-14 13:00:07 +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
84a87fa11b New methods for calculating the count of peers and messages. It should be faster than getting all data in std::list.
Now used in MainWindow.cpp, MessagesDialog.cpp and peerstatus.cpp

void p3Peers::getPeerCount (unsigned int *pnFriendCount, unsigned int *pnOnlineCount);
void p3Msgs::getMessageCount(unsigned int *pnInbox, unsigned int *pnInboxNew, unsigned int *pnOutbox, unsigned int *pnDraftbox, unsigned int *pnSentbox);


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2898 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-13 19:20:40 +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
thunder2
465cd42463 Memory leak:
- getLocalInterfaces -> iptable = (MIB_IPADDRTABLE *) malloc(dwSize);
- main -> RshareSettings  *_settings = new RshareSettings();

ExtAddrFinder::~ExtAddrFinder - use free for pointer allocated with malloc


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2882 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-09 21:58:28 +00:00
csoler
23a0b60e59 fixed chat bug that was truncating some messages, due to using a uint16_t to store a local size. Totally backward compatible. This fix might also affect blog messages.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2880 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-09 20:06:19 +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
astei
a726f3c063 rm a few blankies
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2871 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-08 21:48:14 +00:00
astei
f2f7a3b77d Close tracker id 2994519 by applying patch, looks clean to me.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2870 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-08 21:44:08 +00:00
chrisparker126
7652e831e8 removed unused files qblog
- redundant 



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2868 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-08 17:00:41 +00:00
chrisparker126
e1c4992680 added some minor feature to channels
- clean up of channels old (> storeperiod) cache file downloads called at rsglobal shutdown

- added extrafilehash and extra-remove to rschannels, so it chooses appropriate way to add files (correct book-keeping)
   - added extra files not copied to chan dir if over 100mb (high overhead)
- added limit to channels auto-download (1gig)




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2866 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-08 16:10:34 +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
thunder2
f239e7e4d4 Improved MessagesDialog:
- corrected calculation of message counts
- p3MsgService::checkOutgoingMessages -> notify when message was sent
- refill of message list without clear, selected messages and scroll position are not changed
- corrected sorting of date with only time for today
- changed context menu in message list

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2863 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-07 22:23:38 +00:00
csoler
5813a6454a added a checkpoint to file hashing, to save intermediate results every 10 GB
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2862 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-07 21:17:48 +00:00
leander-256
c85fa705ba Two different improvements:
- since libretroshare doesn't use Qt at all, we remove it from the CONFIG
directive,
- adding files in HEADERS doesn't include them for compilation but only for
installation. Instead we must use gpg-error-config and gpgme-config to fill
correctly INCLUDEPATH.


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2856 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-06 11:06:14 +00:00
defnax
b0c4022ef1 update version
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2855 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-06 10:47:09 +00:00
thunder2
086c5f8e53 Bugfix: show correct signed / unsigned state of forum messages
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2853 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-05 23:06:05 +00:00
thunder2
c3d92dc472 Source code maintenance
Memory leaks:
- NotifyQt::UpdateGUI -> popup messages (toaster) stay hidden in memory
- p3disc::handleIncoming -> item was not deleted when RsDiscHeartbeat (memory leak every tick)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2852 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-05 22:03:43 +00:00
thunder2
ed566d85b9 sorry, forgot one #ifdef for portable version
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2841 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-02 22:28:33 +00:00
defnax
9ee0ad5975 update version
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2835 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-02 16:06:38 +00:00
joss17
1ed191fa9f don't assign an empty dydns address with p3disc
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2823 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-01 19:25:36 +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
thunder2
e5e43741d6 Portable version for Windows.
RetroShare checks for locale gpg.exe and gpgme-w32spawn.exe and if exists, it starts as portable version.
Modified version of libgpgme-11.dll needed.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2815 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-30 14:34:48 +00:00
joss17
3b1d1d35fe add a loopback test
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2806 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-27 21:59:59 +00:00
joss17
f6f22e1e5b lower the timing to avoid network problem under winxp
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2805 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-27 21:59:37 +00:00
csoler
1b4a70dbb3 - ported trunk commit 2801 into branch
Currently the only way to induce a bug is start rs for an ssl_id which
	which does not have a password saved, then try use an ssl id at start
	dialog  which does or does not have a pword (help_pword:bool enters an
	illegal state) 

	I have fixed it by checking if rsinit::passwd == "" then trying to load for
	that ssl_id, if that fails then i set help_pword to false; does not have
	password and pass flow to gpg to ask for passwd. (problem was rs thought
	user had help/pass file and they didn't).

	i have checked it in and tested for
	1. starting with ssl_id which has saved pword, and switching ids at start
		dialog
	2. secondary id may or may not have saved pword. 

- added check for the result of fscanf



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2802 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-27 18:50:37 +00:00
chrisparker126
3364b35064 Currently the only way to induce a bug is start rs for an ssl_id which which does not have a password saved, then try use an ssl id at start dialog which does or does not have a pword (help_pword:bool enters an illegal state)
I have fixed it by checking if rsinit::passwd == "" then trying to load for that ssl_id,
if that fails then i set help_pword to false; does not have password and pass flow to gpg to ask for passwd. (problem was rs thought user had help/pass file and they didn't).

i have checked it in and tested for
1. starting with ssl_id which has saved pword, and switching ids at start dialog
2. secondary id may or may not have saved pword. 


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2801 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-27 15:39:21 +00:00
chrisparker126
8b893fc312 removed authxpgp source files
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2792 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-27 12:01:47 +00:00
chrisparker126
d751ecedf7 added const 'idle' status
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2791 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-27 11:56:06 +00:00
chrisparker126
f1dab2b094 documenting p3chatservice,
added 'idle' status to status service
 - idle status not saved 

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2790 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-27 11:53:46 +00:00
chrisparker126
40da50799e documenting p3msgs
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2789 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-27 11:44:06 +00:00
thunder2
38e06135a4 - The settings in the settings window are only loaded once.
- Saving the settings without changing the network settings doesn't shutdown the connections

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2786 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-25 23:28:10 +00:00
csoler
78644a2441 - Removed some potentially harmful (deadlock) code.
- Put some printf into debugging #ifdef



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2784 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-25 19:26:37 +00:00
joss17
a6b5e8c364 remove debug outputs
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2782 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-25 17:07:18 +00:00
joss17
293efbf702 Set the trust lvl to 3 when accepting a friend and the trust lvl is unknown.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2780 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-25 17:06:48 +00:00
csoler
0773e92f85 Ported patch from thunder2 (http://sourceforge.net/tracker/index.php?func=detail&aid=2991827&group_id=178712&atid=886241)
- Bug fix: Checkbox for automatic share of the incoming directory doesn't correctly set with setDown, use setChecked
- ShareManager and RSettingsWin doesn't need to be created all the time
- RSettingsWin: Save the last active page for the current runtime
- ShareManager and DirectoryPage: Show changed shared directories direct after the change




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2777 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-24 22:09:47 +00:00
chrisparker126
900ae2332f documented p3chatservice.h
come on guys!
http://retroshare.sourceforge.net/wiki/index.php/API_Documentation

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2770 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-24 11:27:25 +00:00
chrisparker126
101e0d9dc6 custom status now sent without needing to have a private chat
- getcustom status now generate a requests to that peer.
- setowncustom status now generates an 'status available' item sent to all peers

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2769 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-24 10:33:12 +00:00
chrisparker126
c5208b29f1 added new const ids for custom status 'request' and 'available'
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2768 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-24 10:30:36 +00:00
csoler
d027af3324 corrected handling of null strings in RsTlvBase::GetTlvString()
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2766 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-04-23 13:42:01 +00:00