Skip to content

Revise: improve debug messages when negotiating compression#5314

Merged
SlySven merged 3 commits intoMudlet:developmentfrom
SlySven:Revise_correctDebugMessagesWhenNegotiatingCompression
Jul 31, 2021
Merged

Revise: improve debug messages when negotiating compression#5314
SlySven merged 3 commits intoMudlet:developmentfrom
SlySven:Revise_correctDebugMessagesWhenNegotiatingCompression

Conversation

@SlySven
Copy link
Copy Markdown
Member

@SlySven SlySven commented Jul 11, 2021

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

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>
@SlySven SlySven requested a review from a team as a code owner July 11, 2021 20:46
@SlySven SlySven requested a review from a team July 11, 2021 20:46
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Jul 11, 2021

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

@SlySven
Copy link
Copy Markdown
Member Author

SlySven commented Jul 11, 2021

The CodeFactor fail is because the change is in an already complex method - and this makes no improvement to that.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

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;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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;
^

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good grief! 🙄

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines-pro-bounds-constant-array-index.html

We can remove this check if we don't agree with it, it's not a problem

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@vadi2 vadi2 assigned SlySven and unassigned vadi2 Jul 31, 2021
…atingCompression

Needed to pull in some changed to fix borked GHActions Windows build.

Signed-off by: Stephen Lyons <slysven@virginmedia.com>
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@SlySven SlySven merged commit ef3b92f into Mudlet:development Jul 31, 2021
@SlySven SlySven deleted the Revise_correctDebugMessagesWhenNegotiatingCompression branch July 31, 2021 23:01
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