Properly store BBB in database

Store the BBB data in the database as the received SD0 packet as opposed to just the raw lxfml.  Addressed several memory leaks as well.
This commit is contained in:
EmosewaMC
2022-08-12 00:33:22 -07:00
parent 008f953003
commit 8474ed83d8
2 changed files with 28 additions and 84 deletions

View File

@@ -1069,15 +1069,6 @@ void HandlePacket(Packet* packet) {
bitStream.Write<unsigned int>(1);
bitStream.Write(blueprintID);
bitStream.Write<uint32_t>(lxfmlSize + 9);
//Write a fake sd0 header:
bitStream.Write<unsigned char>(0x73); //s
bitStream.Write<unsigned char>(0x64); //d
bitStream.Write<unsigned char>(0x30); //0
bitStream.Write<unsigned char>(0x01); //1
bitStream.Write<unsigned char>(0xFF); //end magic
bitStream.Write<uint32_t>(lxfmlSize);
for (size_t i = 0; i < lxfmlSize; ++i)