strophe / libstrophe

A simple, lightweight C library for writing XMPP clients
http://strophe.im/libstrophe
Other
401 stars 163 forks source link

Only signal "stream negotiation success" once. #237

Closed sjaeckel closed 7 months ago

sjaeckel commented 8 months ago

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 https://github.com/profanity-im/profanity/issues/1954

Fixup of c7d410f38b7e51db71eff065c00d3b9d9c895a53

sjaeckel commented 8 months ago

@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.