This was found due to a build error when adding an ovsschema column
with
"type": {"key": "string", "value": "integer"}
with no min or max, only a single instance.

I am rather unfamiliar with IDL, so no tests have been added yet.
I could use some pointers, or someone familiar with IDL tests could
take over.

Signed-off-by: Mickey Spiegel <mickeys....@gmail.com>
---
 ovsdb/ovsdb-idlc.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
index 79db4b4..cd4532e 100755
--- a/ovsdb/ovsdb-idlc.in
+++ b/ovsdb/ovsdb-idlc.in
@@ -372,7 +372,7 @@ static void
                     print "        %s = %s%s_cast(ovsdb_idl_get_row_arc(row_, 
&%stable_classes[%sTABLE_%s], &datum->keys[0].uuid));" % (keyVar, prefix, 
type.key.ref_table.name.lower(), prefix, prefix.upper(), 
type.key.ref_table.name.upper())
 
                 if valueVar:
-                    if type.value.ref_table:
+                    if not type.value.ref_table:
                         print "        %s = datum->values[0].%s;" % (valueVar, 
type.value.type.to_string())
                     else:
                         print "        %s = 
%s%s_cast(ovsdb_idl_get_row_arc(row_, &%stable_classes[%sTABLE_%s], 
&datum->values[0].uuid));" % (valueVar, prefix, 
type.value.ref_table.name.lower(), prefix, prefix.upper(), 
type.value.ref_table.name.upper())
-- 
1.9.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to