diff --git a/libretroshare/src/serialiser/rsconfigitems.cc b/libretroshare/src/serialiser/rsconfigitems.cc index 1acebc4c7..313beb33a 100644 --- a/libretroshare/src/serialiser/rsconfigitems.cc +++ b/libretroshare/src/serialiser/rsconfigitems.cc @@ -684,6 +684,7 @@ uint32_t RsPeerConfigSerialiser::size(RsItem *i) RsPeerNetItem *pni; RsPeerGroupItem *pgi; RsPeerServicePermissionItem *pri; + RsPeerBandwidthLimitsItem *pblitem; if (NULL != (pni = dynamic_cast(i))) { @@ -701,6 +702,10 @@ uint32_t RsPeerConfigSerialiser::size(RsItem *i) { return sizePermissions(pri); } + else if (NULL != (pblitem = dynamic_cast(i))) + { + return sizePeerBandwidthLimits(pblitem); + } return 0; } @@ -712,6 +717,7 @@ bool RsPeerConfigSerialiser::serialise(RsItem *i, void *data, uint32_t *pktsi RsPeerStunItem *psi; RsPeerGroupItem *pgi; RsPeerServicePermissionItem *pri; + RsPeerBandwidthLimitsItem *pblitem; if (NULL != (pni = dynamic_cast(i))) { @@ -729,6 +735,10 @@ bool RsPeerConfigSerialiser::serialise(RsItem *i, void *data, uint32_t *pktsi { return serialisePermissions(pri, data, pktsize); } + else if (NULL != (pblitem = dynamic_cast(i))) + { + return serialisePeerBandwidthLimits(pblitem, data, pktsize); + } return false; } @@ -758,6 +768,8 @@ RsItem *RsPeerConfigSerialiser::deserialise(void *data, uint32_t *pktsize) return deserialiseGroup(data, pktsize); case RS_PKT_SUBTYPE_PEER_PERMISSIONS: return deserialisePermissions(data, pktsize); + case RS_PKT_SUBTYPE_PEER_BANDLIMITS: + return deserialisePeerBandwidthLimits(data, pktsize); default: return NULL; }