hollie/misterhouse — pull request #197 by krkeegan (2013-05-22 00:44:29+00:00)
Title: Insteon: Fix Bug in Link Scan Callback When Nack Received

Clearing $current_scan_device was resulting in an undefined object. This would happen when a device's aldb was listed as out-of-sync. In that scenario, query_aldb_delta would be called, but it would immediately call the aldb_changed_callback without exiting the loop.
The callback would then set the current_scan_device and call scan_link_table on that device. At this point, a _send_msg would be queued and the loop would begin to exit. As it exited it would fall all the way back to line 117 of Insteon.pm and clear the current_scan_device.

This patch prevents that error, by not relying on the state of an otherwise global variable in the logic tree.