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

Only signal "stream negotiation success" once. #237

Merged
merged 2 commits into from
Feb 21, 2024
Merged

Conversation

sjaeckel
Copy link
Member

The code-path which checks whether the server requires an "xmpp-session" was untested and therefore the connection-callback handler was triggered twice with the state XMPP_CONN_CONNECT. This happened if the server supports stream-management and requires a session.

Reported via profanity-im/profanity#1954

Fixup of c7d410f

@sjaeckel sjaeckel added this to the next milestone Feb 13, 2024
@sjaeckel sjaeckel self-assigned this Feb 13, 2024
@sjaeckel
Copy link
Member Author

sjaeckel commented Feb 13, 2024

@lynix can you try this out please?

[Edit] please wait, I have to change something and will let you know once I'm done.

[Edit2] You can test now.

`rc` must be reset in order to make the `do-while` loop work in case
there's no `sockopt_cb` set.

Fixup of f346046

Signed-off-by: Steffen Jaeckel <[email protected]>
The code-path which checks whether the server requires an "xmpp-session"
was untested and therefore the connection-callback handler was triggered
twice with the state `XMPP_CONN_CONNECT`. This happened if the server
supports stream-management and requires a session.

Reported via profanity-im/profanity#1954

Fixup of c7d410f

Signed-off-by: Steffen Jaeckel <[email protected]>
@sjaeckel sjaeckel merged commit 1cf09b1 into master Feb 21, 2024
48 checks passed
@sjaeckel sjaeckel deleted the fix-session branch February 21, 2024 12:39
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