Skip to content

Commit

Permalink
ovsdb-idlc: Return expected sequence number while setting conditions.
Browse files Browse the repository at this point in the history
ovsdb_idl_set_condition() returns a sequence number that can be used to
check if the requested conditions are acknowledged by the server.
However, database bindings do not return this value to the user, making
it impossible to check if the conditions are accepted.

Acked-by: Dumitru Ceara <[email protected]>
Signed-off-by: Ilya Maximets <[email protected]>
  • Loading branch information
igsilya committed Nov 16, 2020
1 parent bb93038 commit be4b771
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ovsdb/ovsdb-idlc.in
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ bool %(s)s_is_updated(const struct %(s)s *, enum %(s)s_column_id);
args = ['%(type)s%(name)s' % member for member in members]
print('%s);' % ', '.join(args))

print('void %(s)s_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);' % {'s': structName})
print('unsigned int %(s)s_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);' % {'s': structName})

print("")

Expand Down Expand Up @@ -1416,10 +1416,10 @@ struct %(s)s *
print("\nstruct ovsdb_idl_column %s_columns[%s_N_COLUMNS];" % (
structName, structName.upper()))
print("""
void
unsigned int
%(s)s_set_condition(struct ovsdb_idl *idl, struct ovsdb_idl_condition *condition)
{
ovsdb_idl_set_condition(idl, &%(p)stable_%(tl)s, condition);
return ovsdb_idl_set_condition(idl, &%(p)stable_%(tl)s, condition);
}""" % {'p': prefix,
's': structName,
'tl': tableName.lower()})
Expand Down

0 comments on commit be4b771

Please sign in to comment.