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

Drop Bad Messages Sent to PLM #100

Merged
merged 2 commits into from
Mar 9, 2013
Merged

Conversation

krkeegan
Copy link
Collaborator

Checks the length of every message sent to the PLM and prevents messages that are too long or too short from being sent to the PLM.

Fix issue #83

- Add sub insteon_cmd_len to Message_Decoder. Returns expected byte length
- Add error message if command sent to plm is improper length

* After testing need to add coding to skip sending an incorrect message

Start of fix for hollie#83
@krkeegan
Copy link
Collaborator Author

So this works fine. But it seems like a solution in search of a problem. Nothing in the current code will allow an incorrect message to be sent to the PLM. Perhaps this would prevent future problems when new code is added??

Still seems like an unnecessary step.

@marcmerlin
Copy link
Collaborator

On Wed, Feb 27, 2013 at 09:19:09PM -0800, krkeegan wrote:

So this works fine. But it seems like a solution in search of a problem. Nothing in the current code will allow an incorrect message to be sent to the PLM. Perhaps this would prevent future problems when new code is added??

Still seems like an unnecessary step.

I think you can consider this as an ASSERT, looking for a condition that
should never happen, but if it does, you catch it and you die.

Marc

"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/

krkeegan added a commit that referenced this pull request Mar 9, 2013
Drop Bad Messages Sent to PLM
@krkeegan krkeegan merged commit c8c9f48 into hollie:master Mar 9, 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.

2 participants