char *error;
bool dry_run;
struct ds comment;
- unsigned int commit_seqno;
/* Increments. */
const char *inc_table;
&& !strcmp(msg->method, "stolen")) {
/* Someone else stole our lock. */
ovsdb_idl_parse_lock_notify(idl, msg->params, false);
- } else if (msg->type == JSONRPC_REPLY && msg->id->type == JSON_STRING
- && !strcmp(msg->id->u.string, "echo")) {
- /* Reply to our echo request. Ignore it. */
} else if ((msg->type == JSONRPC_ERROR
|| msg->type == JSONRPC_REPLY)
&& ovsdb_idl_txn_process_reply(idl, msg)) {
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
}
}
- NOT_REACHED();
+ OVS_NOT_REACHED();
}
static void
}
}
- NOT_REACHED();
+ OVS_NOT_REACHED();
}
/* Turns off OVSDB_IDL_ALERT for 'column' in 'idl'.
txn->error = NULL;
txn->dry_run = false;
ds_init(&txn->comment);
- txn->commit_seqno = txn->idl->change_seqno;
txn->inc_table = NULL;
txn->inc_column = NULL;
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;
}
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;
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;
}