mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-11 02:25:34 -04:00
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
This commit is contained in:
parent
c366c5cc93
commit
a3a75b7aea
4 changed files with 26 additions and 8 deletions
|
@ -70,7 +70,12 @@ void ftFileCreator::closeFile()
|
|||
RsStackMutex stack(ftcMutex); /********** STACK LOCKED MTX ******/
|
||||
|
||||
if(fd != NULL)
|
||||
{
|
||||
#ifdef FILE_DEBUG
|
||||
std::cerr << "CLOSED FILE " << (void*)fd << " (" << file_name << ")." << std::endl ;
|
||||
#endif
|
||||
fclose(fd) ;
|
||||
}
|
||||
|
||||
fd = NULL ;
|
||||
}
|
||||
|
@ -229,7 +234,7 @@ int ftFileCreator::locked_initializeFileAttrs()
|
|||
if (!fd)
|
||||
{
|
||||
std::cerr << "ftFileCreator::initializeFileAttrs() Failed to open (r+b): ";
|
||||
std::cerr << file_name << std::endl;
|
||||
std::cerr << file_name << ", errno = " << errno << std::endl;
|
||||
|
||||
std::cerr << "ftFileCreator::initializeFileAttrs() opening w+b";
|
||||
std::cerr << std::endl;
|
||||
|
@ -239,12 +244,12 @@ int ftFileCreator::locked_initializeFileAttrs()
|
|||
if (!fd)
|
||||
{
|
||||
std::cerr << "ftFileCreator::initializeFileAttrs()";
|
||||
std::cerr << " Failed to open (w+b): "<< file_name << std::endl;
|
||||
std::cerr << " Failed to open (w+b): "<< file_name << ", errno = " << errno << std::endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#ifdef FILE_DEBUG
|
||||
std::cerr << "ftFileCreator::initializeFileAttrs() File Expected Size: " << mSize << " RecvdSize: " << recvdsize << std::endl;
|
||||
std::cerr << "OPENNED FILE " << (void*)fd << " (" << file_name << "), for r/w." << std::endl ;
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue