pidgin/pidgin

Fix memory issues at shutdown

2020-07-27, Elliott S
b119cf7a05b9
Fix memory issues at shutdown

* Fix double-free of accounts menu widgets.
On shutdown, these are part of the menu, and are already destroyed, so
we can't destroy them again as part of finalize, which happens in the
hash table removal.

* Silence some warnings at shutdown.
If the IO operation is cancelled, then it doesn't need to be printed or
considered an error.

* Add config.h back to jabber.h.
This header checks config values (e.g., `HAVE_CYRUS_SASL`), so it should
include config, or else it falls to C sources to do it. And if they
don't, then they end up with incorrect struct offsets, which is causing
weird memory errors as stuff is put in the wrong place.

Testing Done:
valgrind with an xmpp account enabled.

Reviewed at https://reviews.imfreedom.org/r/51/
# Purple, Pidgin and Finch
See AUTHORS and COPYRIGHT for the list of contributors.
libpurple is a library intended to be used by programmers seeking
to write an IM client that connects to many IM networks. It comes
with support for Bonjour, IRC, XMPP, among others, and there are
many more networks supported via third party protocols.
Pidgin is a graphical IM client written in C which uses the GTK+
toolkit.
Finch is a text-based IM client written in C which uses the ncurses
toolkit.
These programs are not endorsed by, nor affiliated with, any
proprietary instant messaging company in any way.
## BUILD
Pidgin uses [meson](https://mesonbuild.com) as a build system.
You can quickly build Pidgin with the following commands
meson build
cd build
ninja
ninja install
There are quite a few options for the build that you can view by looking at `meson_options.txt`. You can specify the options when running meson like the following:
meson -Ddebug=true build
If you've already ran meson you can use `meson configure`
cd build
meson configure -Ddebug=true
## RUN
Currently Pidgin can not be run from a build directory which means you must
install it first. Once you've done that, you only need to run 'pidgin' or
'finch'. If it fails to launch you may need to run `ldconfig` as root.
To get started, simply add a new account.
If you come across a bug, please report it at: https://developer.pidgin.im/
## PLUGINS
If you do not wish to enable the plugin support within Purple, run meson with
`-Dplugins=false` or if you've already ran meson use
`meson configure -Dplugins=false` from the build directory. This will prevent
the ability to load plugins.
`ninja install` puts the plugins in `$PREFIX/lib/purple` (PREFIX being what
you specified when you ran meson. It defaults to `/usr/local`). Purple
looks for the plugins in that directory by default. Plugins can be installed
per-user in `~/.purple/plugins` as well. Pidgin and Finch also look in
`$PREFIX/lib/pidgin` and `$PREFIX/lib/finch` for UI-specific, respectively.
## Developing
There is a ton of information on developing Pidgin available at
[developer.pidgin.im](https://developer.pidgin.im).
To generate the documentation locally you can pass `-Ddoc=true` to `meson` or
`meson configure` which will build the `gtk-docs` for everything.