Beispiel #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();
}
Beispiel #2
0
void
amqp_rpc_destroy(amqp_rpc_t **rpc)
{
    if ((*rpc) != NULL) {
        (void)amqp_rpc_teardown(*rpc);
        hash_fini(&(*rpc)->calls);
        free((*rpc)->exchange);
        free((*rpc)->routing_key);
        BYTES_DECREF(&(*rpc)->reply_to);
        (*rpc)->chan = NULL;
        free(*rpc);
        *rpc = NULL;
    }
}
Beispiel #3
0
void
poller_fini(void)
{
    hash_fini(&events);
    ev_loop_destroy(the_loop);
}
Beispiel #4
0
static void
kill_table(amqp_value_t *v)
{
    hash_fini(&v->value.t);
}