aboutsummaryrefslogtreecommitdiff
path: root/reliable.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-02-16 18:12:24 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-02-16 18:12:24 +0000
commit6add6b2fe78c549d174729869e26cee917e31d5f (patch)
tree7b0786b12c40853bd9742d61e07417ade430f3d2 /reliable.c
parentAdded "bytecount" command to management interface. (diff)
downloadopenvpn-6add6b2fe78c549d174729869e26cee917e31d5f.tar.xz
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
Diffstat (limited to 'reliable.c')
-rw-r--r--reliable.c6
1 files changed, 4 insertions, 2 deletions
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];