X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=lib%2Frconn.c;h=443690b848f5deff8237a0be6c7054c16c106b0b;hb=0574f71b4b6820cecb8247a6e0269606c8ef2edf;hp=61875764b8a3260ed1a7a8966765e5de48081cd6;hpb=b3907fbc6c74ddad7507d0f7abb1f5a2528cd2be;p=openvswitch diff --git a/lib/rconn.c b/lib/rconn.c index 61875764..443690b8 100644 --- a/lib/rconn.c +++ b/lib/rconn.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010 Nicira Networks. + * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -510,6 +510,9 @@ rconn_run_wait(struct rconn *rc) if (rc->vconn) { vconn_run_wait(rc->vconn); + if ((rc->state & (S_ACTIVE | S_IDLE)) && !list_is_empty(&rc->txq)) { + vconn_wait(rc->vconn, WAIT_SEND); + } } for (i = 0; i < rc->n_monitors; i++) { vconn_run_wait(rc->monitors[i]); @@ -520,10 +523,6 @@ rconn_run_wait(struct rconn *rc) long long int expires = sat_add(rc->state_entered, timeo); poll_timer_wait_until(expires * 1000); } - - if ((rc->state & (S_ACTIVE | S_IDLE)) && !list_is_empty(&rc->txq)) { - vconn_wait(rc->vconn, WAIT_SEND); - } } /* Attempts to receive a packet from 'rc'. If successful, returns the packet;