strophe / libstrophe

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

Error out if bind is required but not provided #223

Closed jubalh closed 1 year ago

jubalh commented 1 year ago

Unfortunately not too familar with the code. But wanted to give it a try. If i'm on the right track I will adapt commit message. If I'm taking totally wrong approach I might rather open an issue and close this PR :)

I thought about checking for bind being NULL earlier but then got the impression that it doesn't even matter and we can just error out in the case when it is actually required.

It will thus allow to connect to non rfc6120 compliant servers which could be seen as a downside (without an warning message).

Passing NULL to xmpp_stanza_release() is okay I think?

jubalh commented 1 year ago

Heard that a patch is already being worked on.