Revise: improve debug messages when negotiating compression#5314
Merged
SlySven merged 3 commits intoMudlet:developmentfrom Jul 31, 2021
Merged
Conversation
If compression is disabled the existing message: "Rejecting MCCP v1, because v2 has already been negotiated or FORCE COMPRESSION OFF is set to ON." can be a bit confusing when it is MCCP2 that is not being allowed. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
Member
Author
|
The CodeFactor fail is because the change is in an already complex method - and this makes no improvement to that. |
| if (mpHost->mFORCE_NO_COMPRESSION || ((option == OPT_COMPRESS) && (hisOptionState[static_cast<int>(OPT_COMPRESS2)]))) { | ||
| if (mpHost->mFORCE_NO_COMPRESSION) { | ||
| sendTelnetOption(TN_DONT, option); | ||
| hisOptionState[idxOption] = false; |
Contributor
There was a problem hiding this comment.
warning: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index]
hisOptionState[idxOption] = false;
^
Member
There was a problem hiding this comment.
We can remove this check if we don't agree with it, it's not a problem
vadi2
approved these changes
Jul 12, 2021
vadi2
approved these changes
Jul 20, 2021
…atingCompression Needed to pull in some changed to fix borked GHActions Windows build. Signed-off by: Stephen Lyons <slysven@virginmedia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If compression is disabled the existing message: "Rejecting MCCP v1, because v2 has already been negotiated or FORCE
COMPRESSION OFF is set to ON." can be a bit confusing when it is MCCP2 that is not being allowed.
Signed-off-by: Stephen Lyons slysven@virginmedia.com