mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-28 16:17:28 -04:00
merged upstream/master
This commit is contained in:
commit
c2ae4fc904
77 changed files with 524 additions and 389 deletions
|
@ -126,7 +126,6 @@ void RsGxsCircleSubscriptionRequestItem::clear()
|
|||
std::ostream& RsGxsCircleSubscriptionRequestItem::print(std::ostream& out, uint16_t indent)
|
||||
{
|
||||
printRsItemBase(out, "RsGxsCircleSubscriptionRequestItem", indent);
|
||||
uint16_t int_Indent = indent + 2;
|
||||
|
||||
printRsItemBase(out, "time stmp: ", indent); out << time_stamp ;
|
||||
printRsItemBase(out, "time out : ", indent); out << time_out ;
|
||||
|
|
|
@ -288,10 +288,8 @@ std::ostream& RsGxsVoteItem::print(std::ostream& out, uint16_t indent)
|
|||
}
|
||||
|
||||
|
||||
uint32_t RsGxsCommentSerialiser::sizeGxsVoteItem(RsGxsVoteItem *item)
|
||||
uint32_t RsGxsCommentSerialiser::sizeGxsVoteItem(RsGxsVoteItem */*item*/)
|
||||
{
|
||||
|
||||
const RsGxsVote& msg = item->mMsg;
|
||||
uint32_t s = 8; // header
|
||||
|
||||
s += 4; // vote flags.
|
||||
|
|
|
@ -110,7 +110,6 @@ uint32_t RsGxsIdLocalInfoItem::serial_size()
|
|||
std::ostream& RsGxsIdLocalInfoItem::print(std::ostream& out, uint16_t indent)
|
||||
{
|
||||
printRsItemBase(out, "RsGxsIdLocalInfoItem", indent);
|
||||
uint16_t int_Indent = indent + 2;
|
||||
|
||||
// convert from binary to hex.
|
||||
for(std::map<RsGxsId,time_t>::const_iterator it(mTimeStamps.begin());it!=mTimeStamps.end();++it)
|
||||
|
@ -382,7 +381,7 @@ RsGxsIdLocalInfoItem *RsGxsIdSerialiser::deserialise_GxsIdLocalInfoItem(void *da
|
|||
uint32_t n=0 ;
|
||||
ok &= getRawUInt32(data, rssize, &offset, &n) ;
|
||||
|
||||
for(int i=0;ok && i<n;++i)
|
||||
for(uint32_t i=0;ok && i<n;++i)
|
||||
{
|
||||
RsGxsId gxsid ;
|
||||
time_t TS ;
|
||||
|
@ -397,8 +396,8 @@ RsGxsIdLocalInfoItem *RsGxsIdSerialiser::deserialise_GxsIdLocalInfoItem(void *da
|
|||
{
|
||||
ok &= getRawUInt32(data, rssize, &offset, &n) ;
|
||||
RsGxsId gxsid ;
|
||||
|
||||
for(int i=0;ok && i<n;++i)
|
||||
|
||||
for(uint32_t i=0;ok && i<n;++i)
|
||||
{
|
||||
ok &= gxsid.deserialise(data,rssize,offset) ;
|
||||
|
||||
|
|
|
@ -81,7 +81,6 @@ void RsGxsReputationUpdateItem::clear()
|
|||
std::ostream& RsGxsReputationConfigItem::print(std::ostream &out, uint16_t indent)
|
||||
{
|
||||
printRsItemBase(out, "RsReputationConfigItem", indent);
|
||||
uint16_t int_Indent = indent + 2;
|
||||
|
||||
out << "mPeerId: " << mPeerId << std::endl;
|
||||
out << "last update: " << time(NULL) - mLatestUpdate << " secs ago." << std::endl;
|
||||
|
@ -94,7 +93,6 @@ std::ostream& RsGxsReputationConfigItem::print(std::ostream &out, uint16_t inden
|
|||
std::ostream& RsGxsReputationSetItem::print(std::ostream &out, uint16_t indent)
|
||||
{
|
||||
printRsItemBase(out, "RsReputationSetItem", indent);
|
||||
uint16_t int_Indent = indent + 2;
|
||||
|
||||
out << "GxsId: " << mGxsId << std::endl;
|
||||
out << "mOwnOpinion: " << mOwnOpinion << std::endl;
|
||||
|
@ -110,7 +108,6 @@ std::ostream& RsGxsReputationSetItem::print(std::ostream &out, uint16_t indent)
|
|||
std::ostream& RsGxsReputationUpdateItem::print(std::ostream &out, uint16_t indent)
|
||||
{
|
||||
printRsItemBase(out, "RsReputationUpdateItem", indent);
|
||||
uint16_t int_Indent = indent + 2;
|
||||
|
||||
out << "from: " << PeerId() << std::endl;
|
||||
out << "last update: " << time(NULL) - mLatestUpdate << " secs ago." << std::endl;
|
||||
|
@ -124,7 +121,6 @@ std::ostream& RsGxsReputationUpdateItem::print(std::ostream &out, uint16_t inden
|
|||
std::ostream& RsGxsReputationRequestItem::print(std::ostream &out, uint16_t indent)
|
||||
{
|
||||
printRsItemBase(out, "RsReputationRequestItem", indent);
|
||||
uint16_t int_Indent = indent + 2;
|
||||
|
||||
out << "last update: " << time(NULL) - mLastUpdate << " secs ago." << std::endl;
|
||||
|
||||
|
@ -327,7 +323,7 @@ RsGxsReputationSetItem *RsGxsReputationSerialiser::deserialiseReputationSetItem_
|
|||
uint32_t S ;
|
||||
ok &= getRawUInt32(data, tlvsize, &offset, &S);
|
||||
|
||||
for(int i=0;ok && i<S;++i)
|
||||
for(uint32_t i = 0; ok && (i < S); ++i)
|
||||
{
|
||||
RsPeerId pid ;
|
||||
uint32_t op ;
|
||||
|
@ -365,7 +361,7 @@ RsGxsReputationSetItem *RsGxsReputationSerialiser::deserialiseReputationSetItem(
|
|||
uint32_t S ;
|
||||
ok &= getRawUInt32(data, tlvsize, &offset, &S);
|
||||
|
||||
for(int i=0;ok && i<S;++i)
|
||||
for(uint32_t i = 0; ok && (i < S); ++i)
|
||||
{
|
||||
RsPeerId pid ;
|
||||
uint32_t op ;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
/***** RsServiceInfo ****/
|
||||
|
||||
template<>
|
||||
std::ostream &RsTlvParamRef<RsServiceInfo>::print(std::ostream &out, uint16_t indent) const
|
||||
std::ostream &RsTlvParamRef<RsServiceInfo>::print(std::ostream &out, uint16_t /*indent*/) const
|
||||
{
|
||||
out << "RsServiceInfo: " << mParam.mServiceType << " name " << mParam.mServiceName;
|
||||
out << std::endl;
|
||||
|
|
|
@ -56,8 +56,7 @@ void RsTlvParamRef<uint16_t>::TlvClear()
|
|||
template<>
|
||||
bool RsTlvParamRef<uint16_t>::SetTlv(void *data, uint32_t size, uint32_t *offset) const
|
||||
{
|
||||
uint16_t param = mParam;
|
||||
return SetTlvUInt16(data, size, offset, mParamType, mParam);
|
||||
return SetTlvUInt16(data, size, offset, mParamType, mParam);
|
||||
}
|
||||
|
||||
template<>
|
||||
|
@ -100,7 +99,7 @@ bool RsTlvParamRef<const uint16_t>::SetTlv(void *data, uint32_t size, uint32_t *
|
|||
}
|
||||
|
||||
template<>
|
||||
bool RsTlvParamRef<const uint16_t>::GetTlv(void *data, uint32_t size, uint32_t *offset)
|
||||
bool RsTlvParamRef<const uint16_t>::GetTlv(void */*data*/, uint32_t /*size*/, uint32_t */*offset*/)
|
||||
{
|
||||
return false; //GetTlvUInt16(data, size, offset, mParamType, &mParam);
|
||||
}
|
||||
|
@ -169,7 +168,7 @@ bool RsTlvParamRef<const uint32_t>::SetTlv(void *data, uint32_t size, uint32_t *
|
|||
}
|
||||
|
||||
template<>
|
||||
bool RsTlvParamRef<const uint32_t>::GetTlv(void *data, uint32_t size, uint32_t *offset)
|
||||
bool RsTlvParamRef<const uint32_t>::GetTlv(void */*data*/, uint32_t /*size*/, uint32_t */*offset*/)
|
||||
{
|
||||
return false;
|
||||
//GetTlvUInt32(data, size, offset, mParamType, &mParam);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue