Ghost Town. An hour after "Look Up" shipped, bradshapiro59 found ghosts in it. Three Flock alerts, indoors, from right next to the board, all from gadgets that turned out to be an iPhone and friends. Squachy had been making up names for devices that didn't have one, and every now and then the made-up name looked exactly like a Flock battery's serial number.
What was going on. When a Bluetooth device goes by, Squachy copies down its name. He was reading that name from a scrap of memory that had already been thrown away a moment earlier. Most of the time the scrap still said the right thing. For a device with no name at all, it sometimes held leftover rubbish instead, and Squachy wrote that down as the device's name. That has been quietly wrong for a long time. It only started causing alerts yesterday, when "Look Up" taught him that a Flock battery can name itself with a bare ten-digit number. Leftover rubbish that happened to be ten digits became a Flock camera. He keeps hold of the name properly now, so a nameless gadget stays nameless.
Thanks to bradshapiro59 for finding it, pointing at the exact line, and confirming one of the ghosts was really an Apple device.
The actually-useful part
Fixed
- Bluetooth device names were copied through a pointer into a temporary std::string (
adv->getName().c_str()) that was already destroyed. A nameless device could pick up a garbage name, and a garbage name of ten digits matched v1.24.0's bare-serial FLOCK rule. Both copies (the detector and the raw scan) now hold the string.
