lib/ovsdb-idl.c
/* Processes a batch of messages from the database server on 'idl'.  This may
 * cause the IDL's contents to change.  The client may check for that with
 * ovsdb_idl_get_seqno(). */
Processes a batch of messages from the database server on 'idl'.  This may
cause the IDL's contents to change.  The client may check for that with
ovsdb_idl_get_seqno().
Processes a batch of messages from the database server on ' idl ' . This may cause the IDL ' s contents to change . The client may check for that with ovsdb_idl_get_seqno () .
void
ovsdb_idl_run(struct ovsdb_idl *idl)
{
    if (!idl->session) {
        ovsdb_idl_txn_abort_all(idl);
        return;
    }
    int i;
    ovs_assert(!idl->data.txn);
    ovsdb_idl_send_cond_change(idl);
    jsonrpc_session_run(idl->session);
    for (i = 0; jsonrpc_session_is_connected(idl->session) && i < 50; i++) {
        struct jsonrpc_msg *msg;
        unsigned int seqno;
        seqno = jsonrpc_session_get_seqno(idl->session);
        if (idl->state_seqno != seqno) {
            idl->state_seqno = seqno;
            ovsdb_idl_txn_abort_all(idl);
            ovsdb_idl_restart_fsm(idl);
            if (idl->data.lock_name) {
                jsonrpc_session_send(
                    idl->session,
                    ovsdb_idl_db_compose_lock_request(&idl->data));
            }
        }
        msg = jsonrpc_session_recv(idl->session);
        if (!msg) {
            break;
        }
        ovsdb_idl_process_msg(idl, msg);
        jsonrpc_msg_destroy(msg);
    }
    ovsdb_idl_row_destroy_postprocess(&idl->data);
}
void ovsdb_idl_run ( struct ovsdb_idl * idl ) { if ( ! idl -> session ) { ovsdb_idl_txn_abort_all ( idl ) ; return ; } int i ; ovs_assert ( ! idl -> data . txn ) ; ovsdb_idl_send_cond_change ( idl ) ; jsonrpc_session_run ( idl -> session ) ; for ( i = 0 ; jsonrpc_session_is_connected ( idl -> session ) && i < 50 ; i ++ ) { struct jsonrpc_msg * msg ; unsigned int seqno ; seqno = jsonrpc_session_get_seqno ( idl -> session ) ; if ( idl -> state_seqno != seqno ) { idl -> state_seqno = seqno ; ovsdb_idl_txn_abort_all ( idl ) ; ovsdb_idl_restart_fsm ( idl ) ; if ( idl -> data . lock_name ) { jsonrpc_session_send ( idl -> session , ovsdb_idl_db_compose_lock_request ( & idl -> data ) ) ; } } msg = jsonrpc_session_recv ( idl -> session ) ; if ( ! msg ) { break ; } ovsdb_idl_process_msg ( idl , msg ) ; jsonrpc_msg_destroy ( msg ) ; } ovsdb_idl_row_destroy_postprocess ( & idl -> data ) ; }
Processes a batch of messages from the database server on 'idl'.
Processes a batch of messages from the database server on ' idl ' .