-/* Copyright (c) 2009, 2010 Nicira Networks
+/* Copyright (c) 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.
struct ovsdb_jsonrpc_session;
/* Message rate-limiting. */
-struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
+static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
/* Sessions. */
static struct ovsdb_jsonrpc_session *ovsdb_jsonrpc_session_create(
jsonrpc_session_get_reconnect_stats(js, &rstats);
status->state = rstats.state;
- status->conn_secs = (rstats.is_connected
- ? rstats.current_connection_duration
- : rstats.current_disconnect_duration
- ) / 1000;
-
- return;
+ status->sec_since_connect = rstats.msec_since_connect == UINT_MAX
+ ? UINT_MAX : rstats.msec_since_connect / 1000;
+ status->sec_since_disconnect = rstats.msec_since_disconnect == UINT_MAX
+ ? UINT_MAX : rstats.msec_since_disconnect / 1000;
}
static const char *