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

powermand: fix assertion failure on teardown #118

Merged
merged 1 commit into from
Feb 4, 2024

Conversation

garlick
Copy link
Member

@garlick garlick commented Feb 4, 2024

Problem: an assertion failure is seen when powermand tears down with a tcp-connected device:

powermand: device_tcp.c:266: tcp_disconnect:
Assertion `dev->magic == DEV_MAGIC' failed.

This is because dev_destroy sets dev->magic = 0 before it calls dev->disconnect. When dev->disconnect points to tcp_disconnect() the assertion triggers.

Fixes #106

Copy link
Member

@chu11 chu11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Problem: an assertion failure is seen when powermand tears
down with a tcp-connected device:

powermand: device_tcp.c:266: tcp_disconnect:
  Assertion `dev->magic == DEV_MAGIC' failed.

This is because dev_destroy sets dev->magic = 0 before it calls
dev->disconnect.  When dev->disconnect points to tcp_disconnect()
the assertion triggers.

Fixes chaos#106
@mergify mergify bot merged commit 27955de into chaos:master Feb 4, 2024
8 checks passed
@garlick garlick deleted the issue#106 branch February 4, 2024 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

powermand: device_tcp.c:266: tcp_disconnect: Assertion `dev->magic == DEV_MAGIC' failed
2 participants