From 6add6b2fe78c549d174729869e26cee917e31d5f Mon Sep 17 00:00:00 2001 From: james Date: Thu, 16 Feb 2006 18:12:24 +0000 Subject: Added --port-share option for allowing OpenVPN and HTTPS server to share the same port number. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@893 e7ae566f-a301-0410-adde-c780ea21d3b5 --- reliable.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'reliable.c') diff --git a/reliable.c b/reliable.c index ca83b2b..01e1d0a 100644 --- a/reliable.c +++ b/reliable.c @@ -221,12 +221,13 @@ reliable_ack_print (struct buffer *buf, bool verbose, struct gc_arena *gc) */ void -reliable_init (struct reliable *rel, int buf_size, int offset, int array_size) +reliable_init (struct reliable *rel, int buf_size, int offset, int array_size, bool hold) { int i; CLEAR (*rel); ASSERT (array_size > 0 && array_size <= RELIABLE_CAPACITY); + rel->hold = hold; rel->size = array_size; rel->offset = offset; for (i = 0; i < rel->size; ++i) @@ -465,7 +466,7 @@ reliable_can_send (const struct reliable *rel) reliable_print_ids (rel, &gc)); gc_free (&gc); - return n_current > 0; + return n_current > 0 && !rel->hold; } /* return a unique point-in-time to trigger retry */ @@ -530,6 +531,7 @@ reliable_schedule_now (struct reliable *rel) { int i; dmsg (D_REL_DEBUG, "ACK reliable_schedule_now"); + rel->hold = false; for (i = 0; i < rel->size; ++i) { struct reliable_entry *e = &rel->array[i]; -- cgit v1.2.3