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/
##############################################################################
# General Options
option('doc', type : 'boolean', value : false,
description : 'build documentation with gtk-doc')
option('extraversion', type : 'string',
description : 'extra version number to be displayed in Help->About and --help (for packagers)')
option('glib-errors-trace', type : 'boolean', value : false,
description : 'print backtraces for glib errors')
option('introspection', type : 'feature',
description : 'build introspection data')
option('nettle', type : 'feature',
description : 'enable Nettle support')
option('nls', type : 'boolean', value : true,
description : 'enable installation of translation files')
option('pixmaps-install', type : 'boolean', value : true,
description : 'enable installation of pixmap files - Pidgin still needs them!')
##############################################################################
# Libpurple Options
option('farstream', type : 'feature',
description : 'compile with farstream support')
option('gstreamer', type : 'feature',
description : 'compile with GStreamer audio support')
option('gstreamer-video', type : 'feature',
description : 'compile with GStreamer 1.0 Video Overlay support')
option('kwallet', type : 'feature',
description : 'enable KWallet support')
option('plugins', type : 'boolean', value : true,
description : 'compile plugins')
option('secret-service', type : 'feature',
description : 'enable Secret Service support')
option('vv', type : 'feature',
description : 'compile with voice and video support')
##############################################################################
# Protocol Plugins
option('avahi', type : 'feature',
description : 'compile with avahi (required for Bonjour support)')
option('cyrus-sasl', type : 'feature',
description : 'enable Cyrus SASL support for XMPP/IRC')
option('dynamic-prpls', type : 'string', value: 'all',
description : 'specify which protocols to build dynamically')
option('krb4', type : 'boolean', value : false,
description : 'compile Zephyr plugin with Kerberos 4 support')
option('libgadu', type : 'feature',
description : 'compile with libgadu (required for GaduGadu support)')
option('meanwhile', type : 'feature',
description : 'compile with meanwhile')
option('silc', type : 'feature',
description : 'compile with SILC plugin')
option('zephyr', type : 'feature',
description : 'compile Zephyr plugin against external libzephyr')
##############################################################################
# Pidgin Options
option('console-logging', type : 'boolean', value : false,
description : 'compile with console logging support')
option('gevolution', type : 'feature', value : 'disabled',
description : 'compile with the Evolution plugin')
option('gtkui', type : 'boolean', value : true,
description : 'compile with GTK+ user interface')
option('unity-integration', type : 'feature',
description : 'compile with support for unity integration plugin')
##############################################################################
# Finch Options
option('consoleui', type : 'boolean', value : true,
description : 'compile with console user interface')
option('x', type : 'boolean', value : true)