diff options
author | Ben Pfaff <blp@nicira.com> | 2012-08-08 13:32:57 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2012-09-07 10:48:43 -0700 |
commit | a6f639f8080fe18120bb205609c6e364f6de7e70 (patch) | |
tree | 0bc8d22143b241caba7610e1982f72221a6e4b6f /tests/test-reconnect.c | |
parent | e0f3585d4499db4ad0f22fd3c4749ba2e9814c33 (diff) | |
download | openvswitch-a6f639f8080fe18120bb205609c6e364f6de7e70.tar.gz |
reconnect: Rename reconnect_received() to reconnect_activity().
Receiving data is not the only reasonable way to verify that a connection
is up. For example, on a TCP connection, receiving an acknowledgment that
the remote side has accepted data that we sent is also a reasonable means.
Therefore, this commit generalizes the naming.
Also, similarly for the Python implementation: Reconnect.received() becomes
Reconnect.activity().
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'tests/test-reconnect.c')
-rw-r--r-- | tests/test-reconnect.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test-reconnect.c b/tests/test-reconnect.c index 14569dbad..020ae4822 100644 --- a/tests/test-reconnect.c +++ b/tests/test-reconnect.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, 2011 Nicira, Inc. + * Copyright (c) 2009, 2010, 2011, 2012 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -148,9 +148,9 @@ do_connected(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) } static void -do_received(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) +do_activity(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) { - reconnect_received(reconnect, now); + reconnect_activity(reconnect, now); } static void @@ -220,10 +220,10 @@ diff_stats(const struct reconnect_stats *old, new->state, new->state_elapsed, new->backoff); } if (old->creation_time != new->creation_time - || old->last_received != new->last_received + || old->last_activity != new->last_activity || old->last_connected != new->last_connected) { - printf(" created %lld, last received %lld, last connected %lld\n", - new->creation_time, new->last_received, new->last_connected); + printf(" created %lld, last activity %lld, last connected %lld\n", + new->creation_time, new->last_activity, new->last_connected); } if (old->n_successful_connections != new->n_successful_connections || old->n_attempted_connections != new->n_attempted_connections @@ -280,7 +280,7 @@ static const struct command commands[] = { { "connecting", 0, 0, do_connecting }, { "connect-failed", 0, 1, do_connect_failed }, { "connected", 0, 0, do_connected }, - { "received", 0, 0, do_received }, + { "activity", 0, 0, do_activity }, { "run", 0, 1, do_run }, { "advance", 1, 1, do_advance }, { "timeout", 0, 0, do_timeout }, |