seqno = ovsdb_idl_get_seqno(idl);
for (;;) {
ovsdb_idl_run(idl);
+ if (!ovsdb_idl_is_alive(idl)) {
+ int retval = ovsdb_idl_get_last_error(idl);
+ ctl_fatal("%s: database connection failed (%s)",
+ db, ovs_retval_to_string(retval));
+ }
if (seqno != ovsdb_idl_get_seqno(idl)) {
seqno = ovsdb_idl_get_seqno(idl);
}
\f
-struct cmd_show_table cmd_show_tables[] = {
+static struct cmd_show_table cmd_show_tables[] = {
{&vteprec_table_global,
NULL,
{&vteprec_global_col_managers,
&vteprec_global_col_switches,
- NULL}
+ NULL},
+ {NULL, NULL, NULL}
},
{&vteprec_table_manager,
&vteprec_manager_col_target,
{&vteprec_manager_col_is_connected,
NULL,
- NULL}
+ NULL},
+ {NULL, NULL, NULL}
},
{&vteprec_table_physical_switch,
&vteprec_physical_switch_col_name,
{&vteprec_physical_switch_col_management_ips,
&vteprec_physical_switch_col_tunnel_ips,
- &vteprec_physical_switch_col_ports}
+ &vteprec_physical_switch_col_ports},
+ {NULL, NULL, NULL}
},
{&vteprec_table_physical_port,
&vteprec_physical_port_col_name,
{&vteprec_physical_port_col_vlan_bindings,
NULL,
- NULL}
+ NULL},
+ {NULL, NULL, NULL}
},
{&vteprec_table_logical_switch,
&vteprec_logical_switch_col_name,
{NULL,
NULL,
- NULL}
+ NULL},
+ {NULL, NULL, NULL}
},
- {NULL, NULL, {NULL, NULL, NULL}}
+ {NULL, NULL, {NULL, NULL, NULL}, {NULL, NULL, NULL}}
};
/* vtep-ctl specific context. Inherits the 'struct ctl_context' as base. */
* struct vteprec_physical_locator. */
};
-/* Casts 'base' into 'strcut vtep_ctl_context'. */
+/* Casts 'base' into 'struct vtep_ctl_context'. */
static struct vtep_ctl_context *
vtep_ctl_context_cast(struct ctl_context *base)
{
static void
vtep_ctl_cmd_init(void)
{
- ctl_init(tables, vtep_ctl_exit);
+ ctl_init(tables, cmd_show_tables, vtep_ctl_exit);
ctl_register_commands(vtep_commands);
}