コード例 #1
0
ファイル: color_filters.c プロジェクト: crondaemon/wireshark
gboolean
color_filters_reload(gchar** err_msg, color_filter_add_cb_func add_cb)
{
    /* "move" old entries to the deleted list
     * we must keep them until the dissection no longer needs them */
    color_filter_deleted_list = g_slist_concat(color_filter_deleted_list, color_filter_list);
    color_filter_list = NULL;

    /* start the list with the temporary colorizing rules */
    color_filters_add_tmp(&color_filter_list);

    /* try to read the users filters */
    if (!read_users_filters(&color_filter_list, err_msg, add_cb)) {
        gchar* local_err_msg = NULL;

        /* if that failed, try to read the global filters */
        if (!color_filters_read_globals(&color_filter_list, &local_err_msg, add_cb)) {
            /* Show the first error */
            g_free(local_err_msg);
        }

        return (*err_msg == NULL);
    }
    return TRUE;
}
コード例 #2
0
/* Initialize the filter structures (reading from file) for general running, including app startup */
void
color_filters_init(void)
{
    /* delete all currently existing filters */
    color_filter_list_delete(&color_filter_list);

    /* start the list with the temporary colorizing rules */
    color_filters_add_tmp(&color_filter_list);

    /* try to read the users filters */
    if (!read_users_filters(&color_filter_list))
        /* if that failed, try to read the global filters */
        color_filters_read_globals(&color_filter_list);
}
コード例 #3
0
void
color_filters_reload(void)
{
    /* "move" old entries to the deleted list
     * we must keep them until the dissection no longer needs them */
    color_filter_deleted_list = g_slist_concat(color_filter_deleted_list, color_filter_list);
    color_filter_list = NULL;

    /* start the list with the temporary colorizing rules */
    color_filters_add_tmp(&color_filter_list);

    /* try to read the users filters */
    if (!read_users_filters(&color_filter_list))
        /* if that failed, try to read the global filters */
        color_filters_read_globals(&color_filter_list);
}
コード例 #4
0
ファイル: color_filters.c プロジェクト: crondaemon/wireshark
/* Initialize the filter structures (reading from file) for general running, including app startup */
gboolean
color_filters_init(gchar** err_msg, color_filter_add_cb_func add_cb)
{
    /* delete all currently existing filters */
    color_filter_list_delete(&color_filter_list);

    /* start the list with the temporary colorizing rules */
    color_filters_add_tmp(&color_filter_list);

    /* try to read the users filters */
    if (!read_users_filters(&color_filter_list, err_msg, add_cb)) {
        gchar* local_err_msg = NULL;

        /* if that failed, try to read the global filters */
        if (!color_filters_read_globals(&color_filter_list, &local_err_msg, add_cb)) {
            /* Show the first error */
            g_free(local_err_msg);
        }

        return (*err_msg == NULL);
    }

    return TRUE;
}