lib/ovsdb-idl.c
/* Flushes the tracked rows. Client calls this function after calling
 * ovsdb_idl_run() and read all tracked rows with the ovsdb_idl_track_get_*()
 * functions. This is usually done at the end of the client's processing
 * loop when it is ready to do ovsdb_idl_run() again.
 */
Flushes the tracked rows. Client calls this function after calling
ovsdb_idl_run() and read all tracked rows with the ovsdb_idl_track_get_*()
functions. This is usually done at the end of the client's processing
loop when it is ready to do ovsdb_idl_run() again.
Flushes the tracked rows . Client calls this function after calling ovsdb_idl_run () and read all tracked rows with the ovsdb_idl_track_get_ * () functions . This is usually done at the end of the client ' s processing loop when it is ready to do ovsdb_idl_run () again .
static void
ovsdb_idl_db_track_clear(struct ovsdb_idl_db *db)
{
    size_t i;
    for (i = 0; i < db->class_->n_tables; i++) {
        struct ovsdb_idl_table *table = &db->tables[i];
        if (!ovs_list_is_empty(&table->track_list)) {
            struct ovsdb_idl_row *row, *next;
            LIST_FOR_EACH_SAFE(row, next, track_node, &table->track_list) {
                if (row->updated) {
                    free(row->updated);
                    row->updated = NULL;
                }
                ovs_list_remove(&row->track_node);
                ovs_list_init(&row->track_node);
                if (ovsdb_idl_row_is_orphan(row) && row->tracked_old_datum) {
                    ovsdb_idl_row_unparse(row);
                    const struct ovsdb_idl_table_class *class =
                                                        row->table->class_;
                    for (size_t c = 0; c < class->n_columns; c++) {
                        ovsdb_datum_destroy(&row->tracked_old_datum[c],
                                            &class->columns[c].type);
                    }
                    free(row->tracked_old_datum);
                    row->tracked_old_datum = NULL;
                    free(row);
                }
            }
        }
    }
}
static void ovsdb_idl_db_track_clear ( struct ovsdb_idl_db * db ) { size_t i ; for ( i = 0 ; i < db -> class_ -> n_tables ; i ++ ) { struct ovsdb_idl_table * table = & db -> tables [ i ] ; if ( ! ovs_list_is_empty ( & table -> track_list ) ) { struct ovsdb_idl_row * row , * next ; LIST_FOR_EACH_SAFE ( row , next , track_node , & table -> track_list ) { if ( row -> updated ) { free ( row -> updated ) ; row -> updated = NULL ; } ovs_list_remove ( & row -> track_node ) ; ovs_list_init ( & row -> track_node ) ; if ( ovsdb_idl_row_is_orphan ( row ) && row -> tracked_old_datum ) { ovsdb_idl_row_unparse ( row ) ; const struct ovsdb_idl_table_class * class = row -> table -> class_ ; for ( size_t c = 0 ; c < class -> n_columns ; c ++ ) { ovsdb_datum_destroy ( & row -> tracked_old_datum [ c ] , & class -> columns [ c ] . type ) ; } free ( row -> tracked_old_datum ) ; row -> tracked_old_datum = NULL ; free ( row ) ; } } } } }
Flushes the tracked rows.
Flushes the tracked rows .