diff options
Diffstat (limited to 'src/common/packed.c')
-rw-r--r-- | src/common/packed.c | 19 |
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); |