コード例 #1
0
static
void
unload_ppp_module(void)
{
    void (*ppp_shutdown_module)(void);

    if (!module_dl_handler) {
        // module not loaded
        return;
    }

    g_free(module_descr); module_descr = NULL;
    g_free(module_version); module_version = NULL;
    g_free(module_file_name); module_file_name = NULL;
    if (tried_files) {
        g_list_free_full(tried_files, g_free);
        tried_files = NULL;
    }

    // call module shutdown handler if exists
    ppp_shutdown_module = dlsym(module_dl_handler, "PPP_ShutdownModule");
    if (ppp_shutdown_module)
        ppp_shutdown_module();

    dlclose(module_dl_handler);
    module_dl_handler = NULL;

    fpp_config_destroy();
}
コード例 #2
0
ファイル: np_entry.c プロジェクト: eryngion/freshplayerplugin
static
void
unload_ppp_module(void)
{
    g_free(module_descr); module_descr = NULL;
    g_free(module_version); module_version = NULL;
    g_free(module_file_name); module_file_name = NULL;
    if (tried_files) {
        g_list_free_full(tried_files, g_free);
        tried_files = NULL;
    }

    // call module shutdown handler if exists
    call_plugin_shutdown_module();

    if (module_dl_handler)
        dlclose(module_dl_handler);
    module_dl_handler = NULL;

    fpp_config_destroy();
}