summaryrefslogtreecommitdiffstats
path: root/buffer.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-06-11 10:48:50 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-06-11 10:48:50 +0000
commit4e9a51d78ffa0696cf7d14ff0292ca8863689f70 (patch)
tree0509760011393888bddef1bfc0330d6a5b670671 /buffer.c
parent90efcacba6378a4e29275cd6e9914d73d836a4a4 (diff)
downloadopenvpn-4e9a51d78ffa0696cf7d14ff0292ca8863689f70.tar.gz
openvpn-4e9a51d78ffa0696cf7d14ff0292ca8863689f70.tar.xz
openvpn-4e9a51d78ffa0696cf7d14ff0292ca8863689f70.zip
Merged connection profiles from
http://svn.openvpn.net/projects/openvpn/test/conn git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2993 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/buffer.c b/buffer.c
index 92b10e5..f548e9f 100644
--- a/buffer.c
+++ b/buffer.c
@@ -315,6 +315,26 @@ x_gc_free (struct gc_arena *a)
}
/*
+ * Transfer src arena to dest, resetting src to an empty arena.
+ */
+void
+gc_transfer (struct gc_arena *dest, struct gc_arena *src)
+{
+ if (dest && src)
+ {
+ struct gc_entry *e = src->list;
+ if (e)
+ {
+ while (e->next != NULL)
+ e = e->next;
+ e->next = dest->list;
+ dest->list = src->list;
+ src->list = NULL;
+ }
+ }
+}
+
+/*
* Hex dump -- Output a binary buffer to a hex string and return it.
*/