- sw->rconn = rconn_new_from_vconn(name, vconn);
- sw->lswitch = lswitch_create(sw->rconn, learn_macs,
- setup_flows ? max_idle : -1);
+ sw->rconn = rconn_create(60, 0);
+ rconn_connect_unreliably(sw->rconn, vconn, NULL);
+
+ /* If it was set, rewind 'flow_file' to the beginning, since a
+ * previous call to lswitch_create() will leave the stream at the
+ * end. */
+ if (flow_file) {
+ rewind(flow_file);
+ }
+ sw->lswitch = lswitch_create(sw->rconn, learn_macs, exact_flows,
+ set_up_flows ? max_idle : -1,
+ action_normal, flow_file);
+
+ lswitch_set_queue(sw->lswitch, queue_id);