mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-19 22:40:36 -04:00
Improvements/bugfixes to File Transfer.
* Lots more debugging messages. * Fixed Sleep / sleep issue on windows. * added pthread / WSAStartup. * added ownId to ftDataMultiplex for loopback file transfer. * now start ftDataMultiplex thread. * several bugfixes in ftfilecreator git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@710 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
059effcfac
commit
f7fca4295b
15 changed files with 312 additions and 26 deletions
|
@ -27,6 +27,11 @@
|
|||
* ftServer2Test - Demonstrates how to check for test stuff.
|
||||
*/
|
||||
|
||||
#ifdef WIN32
|
||||
#include "util/rswin.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "ft/ftserver.h"
|
||||
|
||||
#include "ft/ftextralist.h"
|
||||
|
@ -83,6 +88,29 @@ int main(int argc, char **argv)
|
|||
std::list<ftServer *> mOtherServers;
|
||||
std::list<std::string>::iterator eit;
|
||||
|
||||
#ifdef PTW32_STATIC_LIB
|
||||
pthread_win32_process_attach_np();
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
// Windows Networking Init.
|
||||
WORD wVerReq = MAKEWORD(2,2);
|
||||
WSADATA wsaData;
|
||||
|
||||
if (0 != WSAStartup(wVerReq, &wsaData))
|
||||
{
|
||||
std::cerr << "Failed to Startup Windows Networking";
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Started Windows Networking";
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
while(-1 != (c = getopt(argc, argv, "asd:p:e:")))
|
||||
{
|
||||
switch (c)
|
||||
|
@ -156,7 +184,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
std::ostringstream pname;
|
||||
pname << "/tmp/rstst-" << time(NULL);
|
||||
pname << "./tmp/rstst-" << time(NULL);
|
||||
|
||||
std::string basepath = pname.str();
|
||||
RsDirUtil::checkCreateDirectory(basepath);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue