X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=extras%2Fezio%2Fovs-switchui.c;h=36fa3761e9580337747795104a79f6f623e3b051;hb=2848cb494620a13a64a3f862380d709c5977cecb;hp=67f97476810398158bf112fd929856441e010b53;hpb=abaad8cf1b5089e17a4af0ab1ff644bfcf63cad9;p=openvswitch diff --git a/extras/ezio/ovs-switchui.c b/extras/ezio/ovs-switchui.c index 67f97476..36fa3761 100644 --- a/extras/ezio/ovs-switchui.c +++ b/extras/ezio/ovs-switchui.c @@ -35,6 +35,7 @@ #include "ezio.h" #include "fatal-signal.h" #include "netdev.h" +#include "ofp-util.h" #include "ofpbuf.h" #include "openflow/nicira-ext.h" #include "openflow/openflow.h" @@ -160,7 +161,8 @@ main(int argc, char *argv[]) "use --help for help"); } - rconn = rconn_new(argv[0], 5, 5); + rconn = rconn_create(5, 5); + rconn_connect(rconn, argv[0], NULL); die_if_already_running(); daemonize(); @@ -242,7 +244,7 @@ main(int argc, char *argv[]) refresh(); poll_fd_wait(STDIN_FILENO, POLLIN); - poll_timer_wait(timeout - time_msec()); + poll_timer_wait_until(timeout); poll_block(); } while (time_msec() < timeout); age_messages(); @@ -868,7 +870,7 @@ fetch_status(struct rconn *rconn, struct dict *dict, long long timeout) rconn_run_wait(rconn); rconn_recv_wait(rconn); - poll_timer_wait(timeout - time_msec()); + poll_timer_wait_until(timeout); poll_block(); } } @@ -1113,7 +1115,7 @@ do_show_data_rates(void *rates_) rates->xid, &b); rq->type = htons(OFPST_PORT); rq->flags = htons(0); - psr = ofbuf_put_uninit(b, sizeof *psr); + psr = ofpbuf_put_uninit(b, sizeof *psr); memset(psr, 0, sizeof *psr); psr->port_no = htons(OFPP_NONE); update_openflow_length(b); @@ -1714,7 +1716,7 @@ menu_show(const struct menu *menu, int start, bool select) refresh(); if (pos < min || pos > max) { - poll_timer_wait(adjust - time_msec()); + poll_timer_wait_until(adjust); } poll_fd_wait(STDIN_FILENO, POLLIN); poll_block(); @@ -1946,7 +1948,7 @@ static void block_until(long long timeout) { while (timeout > time_msec()) { - poll_timer_wait(timeout - time_msec()); + poll_timer_wait_until(timeout); poll_block(); } drain_keyboard_buffer();