Skip to content

Commit

Permalink
rconn: New function rconn_is_reliable().
Browse files Browse the repository at this point in the history
This will have its first user in an upcoming commit.

Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
blp committed Oct 31, 2018
1 parent da0158d commit 8645f9c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/openvswitch/rconn.h
Expand Up @@ -79,6 +79,7 @@ const char *rconn_get_name(const struct rconn *);
void rconn_set_name(struct rconn *, const char *new_name);
const char *rconn_get_target(const struct rconn *);

bool rconn_is_reliable(const struct rconn *);
bool rconn_is_alive(const struct rconn *);
bool rconn_is_connected(const struct rconn *);
bool rconn_is_admitted(const struct rconn *);
Expand Down
7 changes: 7 additions & 0 deletions lib/rconn.c
Expand Up @@ -883,6 +883,13 @@ rconn_get_target(const struct rconn *rc)
return rc->target;
}

/* Returns true if 'rconn' will reconnect if it disconnects. */
bool
rconn_is_reliable(const struct rconn *rconn)
{
return rconn->reliable;
}

/* Returns true if 'rconn' is connected or in the process of reconnecting,
* false if 'rconn' is disconnected and will not reconnect on its own. */
bool
Expand Down

0 comments on commit 8645f9c

Please sign in to comment.