The reason for signal.signal(signal.SIGPIPE, signal.SIG_DFL)
Python ignores SIGPIPE by default ( signal(SIGPIPE, SIG_IGN) )
Write on a socket return then an error 32 EPIPE, which naturally
turns into an exception.
signal.SIG_DFL restores normal UNIX behavior
Sets are unordered and list with push/pop acts as LIFO, though we need FIFO.
Since the number of elements is tiny, no need to use deque.
Addresses #9120
Dont save fingerprints to config and check certs with our own methods.
We should trust openssl to do all necessary checks.
Self signed certs can be added to cacert.pem and will not show up as
an error until the cert changes.
nbxmpp now saves all ssl errors and passes them, so now we loop over
all errors until all are confirmed or ignored by the user
Also cacerts are now saved in utf-8
This allows us to import the app module without triggering
dependency detection
Also add is_installed() for checking if a dependency is installed and
disable_dependency() in case we dont want to use a dependency
Don't try to resolve _xmppconnect records for servers before trying to connect.
Prevent warnings from gajim.c.resolver for accounts with "connect on startup" disabled.
Its later than StanzaMessageOutgoingEvent, this allows encryption
Plugins to not return the encrypted payload immediatly.
For example encrypting may take some time because a password is needed
or the load has to be encrypted in another Thread.
Using a callback to display a sent message inside the ChatControl means
that all messages we send have to be issued from the GUI layer
(send_message()) if we want them to display in the ChatControl.
This replaces the callback and catches the stanza-message-outgoing event
after it was processed by the core.
This is easier to read/understand than dealing with callbacks and lets
the core issue messages without having to care if a ChatControl is open or not
This was somehow lost once we implemented random resource strings
Although its good that initally a random resource is chosen, it
still should persist across sessions.
This helps to kill zombie client connections on the server because
most servers kill the old session once a new with the same resource
connects
Also dont notify the user about resource conflicts if no custom
resource is set. We should not expect users to know about resources
and what they are used for as long as possible.