X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fovsdb-idl.c;h=7556b7f390122ed6b6eab4611572be6025d2d1ad;hb=28c5588e8e1a8d091c5d2275232c35f2968a97fa;hp=3366523c2b503b3459fee0a9a8742e8584215e24;hpb=6647cb8ce75dfcb2bfd2b2c858eb789bd349687a;p=sliver-openvswitch.git diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 3366523c2..7556b7f39 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -394,6 +394,14 @@ ovsdb_idl_has_ever_connected(const struct ovsdb_idl *idl) return ovsdb_idl_get_seqno(idl) != 0; } +/* Reconfigures 'idl' so that it would reconnect to the database, if + * connection was dropped. */ +void +ovsdb_idl_enable_reconnect(struct ovsdb_idl *idl) +{ + jsonrpc_session_enable_reconnect(idl->session); +} + /* Forces 'idl' to drop its connection to the database and reconnect. In the * meantime, the contents of 'idl' will not change. */ void @@ -441,7 +449,7 @@ ovsdb_idl_get_mode(struct ovsdb_idl *idl, } } - NOT_REACHED(); + OVS_NOT_REACHED(); } static void @@ -505,7 +513,7 @@ ovsdb_idl_add_table(struct ovsdb_idl *idl, } } - NOT_REACHED(); + OVS_NOT_REACHED(); } /* Turns off OVSDB_IDL_ALERT for 'column' in 'idl'. @@ -2105,7 +2113,7 @@ ovsdb_idl_txn_process_inc_reply(struct ovsdb_idl_txn *txn, if (txn->inc_index + 2 > results->n) { VLOG_WARN_RL(&syntax_rl, "reply does not contain enough operations " - "for increment (has %zu, needs %u)", + "for increment (has %"PRIuSIZE", needs %u)", results->n, txn->inc_index + 2); return false; } @@ -2130,7 +2138,7 @@ ovsdb_idl_txn_process_inc_reply(struct ovsdb_idl_txn *txn, return false; } if (rows->u.array.n != 1) { - VLOG_WARN_RL(&syntax_rl, "\"select\" reply \"rows\" has %zu elements " + VLOG_WARN_RL(&syntax_rl, "\"select\" reply \"rows\" has %"PRIuSIZE" elements " "instead of 1", rows->u.array.n); return false; @@ -2160,7 +2168,7 @@ ovsdb_idl_txn_process_insert_reply(struct ovsdb_idl_txn_insert *insert, if (insert->op_index >= results->n) { VLOG_WARN_RL(&syntax_rl, "reply does not contain enough operations " - "for insert (has %zu, needs %u)", + "for insert (has %"PRIuSIZE", needs %u)", results->n, insert->op_index); return false; }