Fixes the next warning:
src/handler.c:683:25: error: ‘key2’ may be used uninitialized in
this function [-Werror=uninitialized]
In fact key2 initialised and used under the same condition.
xmpp_conn_t object can be reused with saving user's handlers.
However, saving system handlers can lead to a fail during connection
process. This is because old object may contain timed handlers for
missed features or other handlers that would handle incoming stanzas
incorrectly.
the C standard says that you're not allowed to cast a function pointer to
something else
6.3.2.3 §8:
A pointer to a function of one type may be converted to a pointer
to a function of another type and back again
User's handler may delete other handlers. If deleted handler is the next
or the previous to the running one it leads to a list corruption.
Don't cache previous/next items when we walk through a handler's list.
According to #97. A single callback can distinguish different cases
using the userdata. Current implementation doesn't allow to delete a
particular couple (handler, userdata), but rather deletes all handlers
regardless of the userdata.
If interface function returns char* the result must be freed with
xmpp_free().
In case of const char* the result must not be changed by user. Also, the
result is valid only during stanza lifetime.