Exemple #1
0
/*
 * Don't actually init nids/pcap until all the pre tags are loaded.
 * TRUE - call again in 1ms
 * FALSE - don't call again
 */
gboolean moloch_ready_gfunc (gpointer UNUSED(user_data))
{
    if (moloch_db_tags_loading() || moloch_http_queue_length(esServer))
        return TRUE;

    if (config.debug)
        LOG("maxField = %d", config.maxField);

    if (config.pcapReadOffline) {
        if (config.dryRun || !config.copyPcap) {
            moloch_writers_start("inplace");
        } else {
            moloch_writers_start(NULL);
        }

    } else {
        if (config.dryRun) {
            moloch_writers_start("null");
        } else {
            moloch_writers_start(NULL);
        }
    }
    moloch_reader_start();
    return FALSE;
}
Exemple #2
0
/*
 * Don't actually init nids/pcap until all the pre tags are loaded
 */
gboolean moloch_nids_init_gfunc (gpointer UNUSED(user_data))
{
    if (moloch_db_tags_loading() == 0) {
        moloch_nids_init();
        return FALSE;
    }
    return TRUE;
}
Exemple #3
0
/*
 * Don't actually end main loop until all tags are loaded
 */
gboolean moloch_quit_gfunc (gpointer UNUSED(user_data))
{
    if (moloch_db_tags_loading() == 0) {
        g_main_loop_quit(mainLoop);
        return FALSE;
    }
    return TRUE;
}