X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Flearning-switch.c;h=e189f1e44320d8f8f415bf0e13a705b809ad6a52;hb=refs%2Fheads%2Flts-1.0a;hp=88a8618c8849ec8b983f5c2ae8b52c4dc000b46c;hpb=6699af68e60e0d03671d1424a5f53258928b16d4;p=sliver-openvswitch.git diff --git a/lib/learning-switch.c b/lib/learning-switch.c index 88a8618c8..e189f1e44 100644 --- a/lib/learning-switch.c +++ b/lib/learning-switch.c @@ -63,7 +63,7 @@ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(30, 300); static void queue_tx(struct lswitch *, struct rconn *, struct ofpbuf *); static void send_features_request(struct lswitch *, struct rconn *); -static void send_default_flows(struct lswitch *sw, struct rconn *rconn, +static void send_default_flows(struct lswitch *sw, struct rconn *rconn, FILE *default_flows); typedef void packet_handler_func(struct lswitch *, struct rconn *, void *); @@ -249,7 +249,7 @@ send_features_request(struct lswitch *sw, struct rconn *rconn) } static void -send_default_flows(struct lswitch *sw, struct rconn *rconn, +send_default_flows(struct lswitch *sw, struct rconn *rconn, FILE *default_flows) { char line[1024]; @@ -260,20 +260,20 @@ send_default_flows(struct lswitch *sw, struct rconn *rconn, uint16_t priority, idle_timeout, hard_timeout; uint64_t cookie; struct ofp_match match; - + char *comment; - + /* Delete comments. */ comment = strchr(line, '#'); - if (comment) { + if (comment) { *comment = '\0'; } - + /* Drop empty lines. */ if (line[strspn(line, " \t\n")] == '\0') { continue; - } - + } + /* Parse and send. str_to_flow() will expand and reallocate the data * in 'buffer', so we can't keep pointers to across the str_to_flow() * call. */