X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Frconn.c;h=ddf578c185aded6b2440d9b18e5b8141c46b41a8;hb=b546a4f73828e30186e2e5423eb70ed7f2347306;hp=eae6a7e8faaea82b11c97f240e48620284ffd395;hpb=133f2dc95454bc3052efdb58e4e26dce4860285e;p=openvswitch diff --git a/lib/rconn.c b/lib/rconn.c index eae6a7e8..ddf578c1 100644 --- a/lib/rconn.c +++ b/lib/rconn.c @@ -446,14 +446,19 @@ run_ACTIVE(struct rconn *rc) { if (timed_out(rc)) { unsigned int base = MAX(rc->last_activity, rc->state_entered); + int version; + VLOG_DBG("%s: idle %u seconds, sending inactivity probe", rc->name, (unsigned int) (time_now() - base)); + version = rconn_get_version(rc); + assert(version >= 0 && version <= 0xff); + /* Ordering is important here: rconn_send() can transition to BACKOFF, * and we don't want to transition back to IDLE if so, because then we * can end up queuing a packet with vconn == NULL and then *boom*. */ state_transition(rc, S_IDLE); - rconn_send(rc, make_echo_request(), NULL); + rconn_send(rc, make_echo_request(version), NULL); return; }