Merge branch '5-ajouter-un-flag-de-debut' into 'master'

Resolve "Ajouter un flag de début"

Closes #5

See merge request perdriau/dazibao!6
This commit is contained in:
PERDRIAU nelson 2020-04-29 14:03:42 +02:00
commit baa283bf78
2 changed files with 8 additions and 0 deletions

View File

@ -21,6 +21,12 @@ static list *neighbour_list;
/* ---- Fonctions utilitaires ---- */
void debug_print(char message_debug){
if (debug_flag == 1) {
printf("\x1b[33m\x1b[4m>> Debug :\x1b[0m\x1b[33m %s\x1b[0m\n", message_debug );
}
}
// Get list length
int len_list(list *l) {
int len = 0;

View File

@ -119,6 +119,8 @@ int bootstrap_node(int * sock_fd, list * neighbourhood);
// Helper functions
int len_list(list *l);
void debug_print(char message_debug);
neighbour_peer *get_random_neighbour();
// get data associated with id, if it doesn't exist return NULL