vconn: Allow vconns to delegate to underlying implementations.
authorBen Pfaff <blp@nicira.com>
Wed, 30 Jul 2008 22:43:57 +0000 (15:43 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 30 Jul 2008 22:43:57 +0000 (15:43 -0700)
lib/vconn.c

index 99a2eb016062390c14eaf78789121a9febb7ff5a..8638efbe354977a4558e34c51a484ca295360737 100644 (file)
@@ -74,11 +74,16 @@ check_vconn_classes(void)
         struct vconn_class *class = vconn_classes[i];
         assert(class->name != NULL);
         assert(class->open != NULL);
-        assert(class->close != NULL);
-        assert(class->accept
-               ? !class->recv && !class->send
-               :  class->recv && class->send);
-        assert(class->wait != NULL);
+        if (class->close || class->accept || class->recv || class->send
+            || class->wait) {
+            assert(class->close != NULL);
+            assert(class->accept
+                   ? !class->recv && !class->send
+                   :  class->recv && class->send);
+            assert(class->wait != NULL);
+        } else {
+            /* This class delegates to another one. */
+        }
     }
 #endif
 }