2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-15 14:17:18 +00:00

Check invariants earlier in vconn and stream code.

These invariants are checked by vconn_open() and stream_open(), but there
is no reason not to check them earlier also.  vconn and stream creation
don't have to go through vconn_open() and stream_open(), so this ensures
that the invariants get checked either way.
This commit is contained in:
Ben Pfaff
2010-01-06 14:20:19 -08:00
parent 84ee7bcfde
commit e0668bd1d4
2 changed files with 2 additions and 0 deletions

View File

@@ -476,6 +476,7 @@ stream_init(struct stream *stream, struct stream_class *class,
: SCS_DISCONNECTED);
stream->error = connect_status;
stream->name = xstrdup(name);
assert(stream->state != SCS_CONNECTING || class->connect);
}
void