mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-10 10:05:19 -04:00
progress in grouter code
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6955 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
dbfe3f6c51
commit
fd994a546b
6 changed files with 270 additions and 21 deletions
|
@ -124,6 +124,19 @@ RsGRouterItem *RsGRouterSerialiser::deserialise_RsGRouterACKItem(void *data, uin
|
|||
return NULL ;
|
||||
}
|
||||
|
||||
RsGRouterGenericDataItem *RsGRouterGenericDataItem::duplicate() const
|
||||
{
|
||||
RsGRouterGenericDataItem *item = new RsGRouterGenericDataItem ;
|
||||
*item = *this ; // copies everything.
|
||||
|
||||
// then duplicate the memory chunk
|
||||
|
||||
item->data_bytes = (uint8_t*)malloc(data_size) ;
|
||||
memcpy(item->data_bytes,data_bytes,data_size) ;
|
||||
|
||||
return item ;
|
||||
}
|
||||
|
||||
uint32_t RsGRouterGenericDataItem::serial_size() const
|
||||
{
|
||||
std::cerr << "(II) " << __PRETTY_FUNCTION__ << " not yet implemented!" << std::endl;
|
||||
|
@ -167,7 +180,7 @@ std::ostream& RsGRouterACKItem::print(std::ostream& o, uint16_t)
|
|||
{
|
||||
o << "RsGRouterACKItem:" << std::endl ;
|
||||
o << " direct origin: \""<< PeerId() << "\"" << std::endl ;
|
||||
o << " Key: " << destination_key.toStdString() << std::endl ;
|
||||
o << " Mid: " << mid << std::endl ;
|
||||
o << " State: " << state << std::endl ;
|
||||
|
||||
return o ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue