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

@ -284,20 +284,6 @@ bool p3Channels::channelSubscribe(std::string cId, bool subscribe)
std::cerr << cId;
std::cerr << std::endl;
if (subscribe)
{
std::string channeldir = mChannelsDir + "/" + cId;
/* create chanDir */
if (!RsDirUtil::checkCreateDirectory(channeldir))
{
std::cerr << "p3Channels::channelSubscribe()";
std::cerr << " Failed to create Channels Directory: ";
std::cerr << channeldir;
std::cerr << std::endl;
}
}
return subscribeToGroup(cId, subscribe);
}
@ -316,6 +302,7 @@ bool p3Channels::locked_eventUpdateGroup(GroupInfo *info, bool isNew)
std::cerr << "p3Channels::locked_eventUpdateGroup() ";
std::cerr << grpId;
std::cerr << " flags:" << info->flags;
std::cerr << std::endl;
if (isNew)
@ -328,6 +315,7 @@ bool p3Channels::locked_eventUpdateGroup(GroupInfo *info, bool isNew)
}
if (info->flags & RS_DISTRIB_SUBSCRIBED)
// || (info->flags & RS_DISTRIB_SUBSCRIBED))
{
std::string channeldir = mChannelsDir + "/" + grpId;
@ -458,6 +446,34 @@ bool p3Channels::locked_eventNewMsg(GroupInfo *grp, RsDistribMsg *msg, std::stri
}
void p3Channels::locked_notifyGroupChanged(GroupInfo &grp)
{
/* create directory if needed */
if (grp.flags & RS_DISTRIB_SUBSCRIBED)
{
std::string channeldir = mChannelsDir + "/" + grp.grpId;
/* create chanDir */
if (!RsDirUtil::checkCreateDirectory(channeldir))
{
std::cerr << "p3Channels::channelSubscribe()";
std::cerr << " Failed to create Channels Directory: ";
std::cerr << channeldir;
std::cerr << std::endl;
}
else
{
std::cerr << "p3Channels::channelSubscribe()";
std::cerr << " Created: ";
std::cerr << channeldir;
std::cerr << std::endl;
}
}
return p3GroupDistrib::locked_notifyGroupChanged(grp);
}
/****************************************/