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
- 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
- enabled draft box
bugfix MessagesDialog:
- correct from and to in list and message header
changes MessageComposer:
- cleaned channel part
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2994 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2951: cleaned up some desastrous code in rsdiscitems.cc
2952: put back an exit when the local address+port are already in use.
Otherwise this corrupts file lists, config files etc.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2953 b45a01b8-16f6-495d-af2f-9b41ad6348cc
- 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
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
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
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
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
- 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
- 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
- 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