Пример #1
0
static void all_fini(void)
{
    // Make some effort to honnor any plugins destructor at exit

    doomer_stop();  // doomer_thread must not awake while we destroy parsers, plugins, and so on

    pkt_source_fini();
    plugin_del_all(); // Since hook subscribers is not locked, we must kill sources before unregister plugins

    for (unsigned i = NB_ELEMS(initers); i > 0; ) {
        initers[--i].fini();
    }

#   ifdef DELETE_ALL_AT_EXIT
    /* This is sometime usefull to clean all allocated ressources
     * at exit to help valgrind help us find memory leaks. */
    ERR_free_strings();
#   endif

    redim_array_fini();
    hash_fini();
    ref_fini();
    mallocer_fini();
    cli_fini();
    ext_fini();
    files_fini();
    log_fini();
}
Пример #2
0
/**
 * teamdctl_disconnect:
 * @tdc: libteamdctl library context
 *
 * Disconnect from teamd instance.
 **/
TEAMDCTL_EXPORT
void teamdctl_disconnect(struct teamdctl *tdc)
{
	cli_fini(tdc);
	tdc->cli = NULL;
}