compilation errors

This commit is contained in:
gonzalef 2020-04-24 19:07:50 +02:00
parent d6a2ca7c3b
commit 543a2a266e
6 changed files with 6 additions and 6 deletions

Binary file not shown.

View File

@ -468,7 +468,7 @@ int validate_tlv(char *data, int pos, int16_t packet_len){
// For every packet recivied, // For every packet recivied,
// then we make sure it's conform // then we make sure it's conform
// We then extract the data from it to make it easy to work with // We then extract the data from it to make it easy to work with
int check_header(char * received_data_buffer[], int received_data_len, struct packet * packet_to_return){ int check_header(char * received_data_buffer, int received_data_len, struct packet * packet_to_return){
packet_to_return = (packet*) received_data_buffer; packet_to_return = (packet*) received_data_buffer;
@ -692,7 +692,7 @@ int work_with_tlvs(char * data, int16_t packet_len, struct sockaddr_in6 *sender,
return 0; return 0;
} }
int listen_for_packets(char * received_data_buffer[], int received_data_len, struct sockaddr_in6 * sender, int sock_fd){ int listen_for_packets(char * received_data_buffer, int received_data_len, struct sockaddr_in6 * sender, int sock_fd){
// We verify the received packet is well formated, // We verify the received packet is well formated,
// and we return it in the struct designed to work with it. // and we return it in the struct designed to work with it.
@ -803,7 +803,7 @@ int run_node(int sock_fd, list * neighbourhood){
input_buffer[strcspn(input_buffer, "\n")] = 0; input_buffer[strcspn(input_buffer, "\n")] = 0;
printf(">> Adding following message to the table : “%s”\n", input_buffer ); printf(">> Adding following message to the table : “%s”\n", input_buffer );
// Add message to the message table. // Add message to the message table.
if (add_message(&input_buffer, bytes) < 0) { if (add_message(input_buffer, bytes) < 0) {
perror(">> Error while trying to add the message to the list of messages, please try again.."); perror(">> Error while trying to add the message to the list of messages, please try again..");
} }
} }
@ -833,7 +833,7 @@ int run_node(int sock_fd, list * neighbourhood){
if (bytes > 0) { if (bytes > 0) {
printf("Received: %.*s\r", (int)bytes, output_buffer); printf("Received: %.*s\r", (int)bytes, output_buffer);
// Treat incoming packets. // Treat incoming packets.
int work_tlv_status = listen_for_packets(&output_buffer, bytes, &sender, sock_fd); int work_tlv_status = listen_for_packets(output_buffer, bytes, &sender, sock_fd);
if (work_tlv_status < 0) { if (work_tlv_status < 0) {
perror(">> Error while treating the incoming packet."); perror(">> Error while treating the incoming packet.");
} }

View File

@ -65,9 +65,9 @@ typedef struct list {
// TODO // TODO
// fonctions signatures // fonctions signatures
int listen_for_packets(char * received_data_buffer[], int received_data_len, struct sockaddr_in6 * sender, int sock_fd); int listen_for_packets(char * received_data_buffer, int received_data_len, struct sockaddr_in6 * sender, int sock_fd);
int check_header(char * received_data_buffer[], int received_data_len, packet * packet_to_return); int check_header(char * received_data_buffer, int received_data_len, packet * packet_to_return);
int validate_tlv(char *data, int pos, int16_t packet_len); int validate_tlv(char *data, int pos, int16_t packet_len);

Binary file not shown.

Binary file not shown.

BIN
src/tlv.o

Binary file not shown.