More bugfixes ... got the basic channels file transfer working.

* Create channels directory correctly.
 * added File Transfers to Config List.
 * connected statusChange() monitor callback.
 * fixed file sources in transfermodule.
 * fixed up transfer restarts / sleeps.
 * enabled opening files read only.
 * disabled some of the debug.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@799 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-11-13 23:03:46 +00:00
parent b0d462c93e
commit fce83cb232
16 changed files with 322 additions and 229 deletions

View file

@ -64,8 +64,9 @@ bool ftFileProvider::getFileData(uint64_t offset, uint32_t chunk_size, void *dat
/*
* FIXME: Warning of comparison between unsigned and signed int?
*/
int data_size = chunk_size;
long base_loc = offset;
uint32_t data_size = chunk_size;
uint64_t base_loc = offset;
if (base_loc + data_size > mSize)
{
@ -138,13 +139,22 @@ int ftFileProvider::initializeFileAttrs()
* attempt to open file
*/
fd = fopen(file_name.c_str(), "r+b");
fd = fopen(file_name.c_str(), "rb");
if (!fd)
{
std::cerr << "ftFileProvider::initializeFileAttrs() Failed to open (r+b): ";
std::cerr << file_name << std::endl;
return 0;
/* try opening read only */
fd = fopen(file_name.c_str(), "rb");
if (!fd)
{
std::cerr << "ftFileProvider::initializeFileAttrs() Failed to open (rb): ";
std::cerr << file_name << std::endl;
/* try opening read only */
return 0;
}
}
/*