Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insteon: Fix Bug in Link Scan Callback When Nack Received #197

Merged
merged 1 commit into from
May 22, 2013

Conversation

krkeegan
Copy link
Collaborator

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.

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.
krkeegan added a commit that referenced this pull request May 22, 2013
Insteon: Fix Bug in Link Scan Callback When Nack Received
@krkeegan krkeegan merged commit c8a7260 into hollie:master May 22, 2013
@krkeegan krkeegan deleted the scan_changed_nack_bug branch May 22, 2013 00:44
@hollie hollie mentioned this pull request Jun 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant