Revision 729826c9

View differences:

include/trade_msg_la.h
13 13
 *
14 14
 */
15 15

  
16
/**
17
 * @brief Size of the chunk header in bytes.
18
 */
19
#define CHUNK_HEADER_SIZE 20
20

  
16 21
 /**
17 22
  * @brief Encode a sequence of information, filling the buffer with the corresponding bit stream.
18 23
  * 
src/ChunkTrading/chunk_delivery.c
51 51
  uint8_t *buff;
52 52
  int res;
53 53

  
54
  buff_len  = 20 + sizeof(transid) + c->size + c->attributes_size;
54
  buff_len  = CHUNK_HEADER_SIZE + sizeof(transid) + c->size + c->attributes_size;
55 55
  buff = malloc(buff_len + 1);
56 56
  if (buff == NULL) {
57 57
      return -1;
src/ChunkTrading/chunk_encoding.c
14 14
#include "trade_msg_la.h"
15 15
#include "int_coding.h"
16 16

  
17
#define CHUNK_HEADER_SIZE 20
18 17

  
19 18
int encodeChunk(const struct chunk *c, uint8_t *buff, int buff_len)
20 19
{

Also available in: Unified diff