mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-28 16:17:28 -04:00
added packet slicing for large broadcast chat items, and output warning when chat of serialised item is too big. Also fixed a couple of bugs in the handling of chat packets
This commit is contained in:
parent
1b5d31ff7f
commit
59aef8ab7b
2 changed files with 39 additions and 34 deletions
|
@ -58,7 +58,10 @@ bool RsServiceSerialiser::serialise(RsItem *i, void *data, uint32_t *pktsize)
|
|||
return false; /* not enough space */
|
||||
|
||||
if (tlvsize > getRsPktMaxSize())
|
||||
return false; /* packet too big */
|
||||
{
|
||||
std::cerr << "(EE) Serialised packet is too big. Maximum allowed size is " << getRsPktMaxSize() << ". Serialised size is " << tlvsize << ". Please tune your service to correctly split packets" << std::endl;
|
||||
return false; /* packet too big */
|
||||
}
|
||||
|
||||
*pktsize = tlvsize;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue