Closed degaart closed 7 years ago
It doesn't work, because 2nd call of xmpp_handler_add()
with the same handler function is ignored:
/* check if handler already in list */
for (item = conn->handlers; item; item = item->next) {
if (item->handler == (void *)handler)
break;
}
if (item) return;
Adding same handler function with different userdata makes sense. I will look into this.
And please, use https://github.com/strophe/libstrophe instead of current repository. libstrophe was moved there. Also recreate your ticket there.
Thank you pasis. I've recreated my ticked in the new repository
Calling
xmpp_handler_add
twice with the samehandler
but differentuserdata
doesn't work. The second call is ignored.I need it because I'm writing a C++ wrapper for libstrophe and handlers are implemented as pure virtual classes with a static member function as
xmpp_handler
, which means every handler callback function has the same memory address, only the userdata changes.