summaryrefslogtreecommitdiff
path: root/src/common/packed.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-05-14 19:40:07 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-05-14 19:40:07 (GMT)
commit0286b53bad21abf91cbe17c4772ca9cde6a89cbc (patch)
tree3bec9dc7e118c00ce9c748576b01606a71880ad7 /src/common/packed.c
parent267b1ae8608ed4bf52de743798e8647c903ee1b4 (diff)
Created an instruction database for Chrysalide.
Diffstat (limited to 'src/common/packed.c')
-rw-r--r--src/common/packed.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/common/packed.c b/src/common/packed.c
index 1abfa98..ca6e816 100644
--- a/src/common/packed.c
+++ b/src/common/packed.c
@@ -53,6 +53,25 @@ void init_packed_buffer(packed_buffer *pbuf)
pbuf->allocated = PACKET_BLOCK_SIZE;
pbuf->data = malloc(pbuf->allocated * sizeof(uint8_t));
+ reset_packed_buffer(pbuf);
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : pbuf = paquet de données à réinitialiser. [OUT] *
+* *
+* Description : Réinitialise un paquet réseau pour une constitution. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void reset_packed_buffer(packed_buffer *pbuf)
+{
pbuf->used = 0;
pbuf->pos = sizeof(uint32_t);