[ovs-dev] [PATCH 2/6] rconn: New function rconn_is_reliable().

Ben Pfaff blp at ovn.org
Mon Oct 29 22:57:47 UTC 2018


This will have its first user in an upcoming commit.

Signed-off-by: Ben Pfaff <blp at ovn.org>
---
 include/openvswitch/rconn.h | 1 +
 lib/rconn.c                 | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/include/openvswitch/rconn.h b/include/openvswitch/rconn.h
index 5dc988af1dda..fd60a6ce1dea 100644
--- a/include/openvswitch/rconn.h
+++ b/include/openvswitch/rconn.h
@@ -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 *);
diff --git a/lib/rconn.c b/lib/rconn.c
index 3fabc504fba0..48ae8c6a72e5 100644
--- a/lib/rconn.c
+++ b/lib/rconn.c
@@ -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
-- 
2.16.1



More information about the dev mailing list