mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 13:30:36 -04:00
Final changes to add the new serialiser.
- added Chat / Msg and Disc services. - expanded rsiface to handle new serialiser. - mods to rsserver with new conversions etc. - added service directory to Makefile. - removed PROXY / CHANNELS from make.opt git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@276 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d9efb76b01
commit
46a001af47
19 changed files with 3605 additions and 156 deletions
|
@ -29,6 +29,8 @@
|
|||
#include "rsserver/p3face.h"
|
||||
#include "util/rsdir.h"
|
||||
|
||||
#include "serialiser/rsconfigitems.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
|
@ -82,31 +84,48 @@ int RsServer::UpdateAllTransfers()
|
|||
std::list<FileTransferInfo> &transfers = iface.mTransferList;
|
||||
transfers.clear();
|
||||
|
||||
std::list<FileTransferItem *> nTransList = server -> getTransfers();
|
||||
std::list<FileTransferItem *>::iterator it;
|
||||
std::list<RsFileTransfer *> nTransList = server -> getTransfers();
|
||||
std::list<RsFileTransfer *>::iterator it;
|
||||
|
||||
for(it = nTransList.begin(); it != nTransList.end(); it++)
|
||||
{
|
||||
FileTransferInfo ti;
|
||||
if ((*it) -> p)
|
||||
|
||||
/* set it up */
|
||||
certsign sign;
|
||||
cert *c = NULL;
|
||||
if (!convert_to_certsign((*it)->PeerId(), sign))
|
||||
{
|
||||
ti.source = (*it) -> p -> Name();
|
||||
std::cerr << "CERTSIGN error!" << std::endl;
|
||||
}
|
||||
|
||||
/* look it up */
|
||||
c = getSSLRoot() -> findcertsign(sign);
|
||||
if (c == NULL)
|
||||
{
|
||||
std::cerr << "CERTSIGN error! 2" << std::endl;
|
||||
ti.source = "Unknown";
|
||||
}
|
||||
else
|
||||
{
|
||||
ti.source = "Unknown";
|
||||
ti.source = c -> Name();
|
||||
}
|
||||
|
||||
ti.id = intGetCertId((cert *) (*it) -> p);
|
||||
ti.fname = (*it) -> name;
|
||||
ti.hash = (*it) -> hash;
|
||||
ti.path = (*it) -> path;
|
||||
ti.size = (*it) -> size;
|
||||
ti.id = (*it)->PeerId();
|
||||
ti.peerIds = (*it) -> allPeerIds.ids;
|
||||
|
||||
ti.fname = (*it) -> file.name;
|
||||
ti.hash = (*it) -> file.hash;
|
||||
ti.path = (*it) -> file.path;
|
||||
ti.size = (*it) -> file.filesize;
|
||||
|
||||
ti.transfered = (*it) -> transferred;
|
||||
/* other ones!!! */
|
||||
ti.tfRate = (*it) -> crate;
|
||||
ti.tfRate = (*it) -> crate / 1000;
|
||||
ti.download = (*it) -> in;
|
||||
ti.downloadStatus = (*it) -> state;
|
||||
transfers.push_back(ti);
|
||||
|
||||
}
|
||||
|
||||
iface.setChanged(RsIface::Transfer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue