summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-06-03 14:41:35 -0700
committerBen Pfaff <blp@nicira.com>2010-06-08 10:35:53 -0700
commit9794e806040d4643e376ae7a5cdf5e7cdcfc3c16 (patch)
treedd66c9d4a01ff3e268f0b53711a2be6b3ea20cda /lib
parent58bdd0925ede5e74060c972bdcbffa3ef03cbd50 (diff)
downloadopenvswitch-9794e806040d4643e376ae7a5cdf5e7cdcfc3c16.tar.gz
rconn: Drop rconn_new(), rconn_new_from_vconn() functions.
There are enough rconn functions without these helpers, which weren't used much in practice.
Diffstat (limited to 'lib')
-rw-r--r--lib/rconn.c23
-rw-r--r--lib/rconn.h3
2 files changed, 4 insertions, 22 deletions
diff --git a/lib/rconn.c b/lib/rconn.c
index a26b0370d..7d9592a9a 100644
--- a/lib/rconn.c
+++ b/lib/rconn.c
@@ -145,24 +145,6 @@ static void copy_to_monitor(struct rconn *, const struct ofpbuf *);
static bool is_connected_state(enum state);
static bool is_admitted_msg(const struct ofpbuf *);
-/* Creates a new rconn, connects it (reliably) to 'name', and returns it. */
-struct rconn *
-rconn_new(const char *name, int inactivity_probe_interval, int max_backoff)
-{
- struct rconn *rc = rconn_create(inactivity_probe_interval, max_backoff);
- rconn_connect(rc, name);
- return rc;
-}
-
-/* Creates a new rconn, connects it (unreliably) to 'vconn', and returns it. */
-struct rconn *
-rconn_new_from_vconn(struct vconn *vconn)
-{
- struct rconn *rc = rconn_create(60, 0);
- rconn_connect_unreliably(rc, vconn);
- return rc;
-}
-
/* Creates and returns a new rconn.
*
* 'probe_interval' is a number of seconds. If the interval passes once
@@ -174,7 +156,10 @@ rconn_new_from_vconn(struct vconn *vconn)
* 'max_backoff' is the maximum number of seconds between attempts to connect
* to the peer. The actual interval starts at 1 second and doubles on each
* failure until it reaches 'max_backoff'. If 0 is specified, the default of
- * 8 seconds is used. */
+ * 8 seconds is used.
+ *
+ * The new rconn is initially unconnected. Use rconn_connect() or
+ * rconn_connect_unreliably() to connect it. */
struct rconn *
rconn_create(int probe_interval, int max_backoff)
{
diff --git a/lib/rconn.h b/lib/rconn.h
index aa9d76c14..82228526c 100644
--- a/lib/rconn.h
+++ b/lib/rconn.h
@@ -37,9 +37,6 @@
struct vconn;
struct rconn_packet_counter;
-struct rconn *rconn_new(const char *name,
- int inactivity_probe_interval, int max_backoff);
-struct rconn *rconn_new_from_vconn(struct vconn *);
struct rconn *rconn_create(int inactivity_probe_interval, int max_backoff);
void rconn_set_max_backoff(struct rconn *, int max_backoff);