From b803dfadd1525c3d9cb0a8d80fabca54c43cf998 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 30 Jul 2008 15:43:57 -0700 Subject: [PATCH] vconn: Allow vconns to delegate to underlying implementations. --- lib/vconn.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/vconn.c b/lib/vconn.c index 99a2eb01..8638efbe 100644 --- a/lib/vconn.c +++ b/lib/vconn.c @@ -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 } -- 2.30.2