]> git.proxmox.com Git - mirror_ovs.git/commitdiff
ovsdb-idlc: Return expected sequence number while setting conditions.
authorIlya Maximets <i.maximets@ovn.org>
Tue, 10 Nov 2020 12:03:53 +0000 (13:03 +0100)
committerIlya Maximets <i.maximets@ovn.org>
Mon, 16 Nov 2020 16:47:11 +0000 (17:47 +0100)
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 <dceara@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
ovsdb/ovsdb-idlc.in

index 698fe25f30957e3312de9cc1b2d6d9c0089bdd63..b1319560640bd723e505e33e534d2f194298a489 100755 (executable)
@@ -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("")
 
@@ -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()})