Ajout d'une fonction de débug
This commit is contained in:
		
							parent
							
								
									a832c2f64c
								
							
						
					
					
						commit
						fb35033502
					
				| @ -13,6 +13,12 @@ | ||||
| 
 | ||||
| /* ----  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; | ||||
| @ -292,6 +298,8 @@ void listen_for_packets(){ | ||||
| 
 | ||||
| int main(int argc, const char *argv[]) { | ||||
|     int cont = 1; | ||||
| 	int debug_flag = 0; | ||||
| 
 | ||||
| 
 | ||||
|     while(cont){ | ||||
| 
 | ||||
|  | ||||
| @ -88,6 +88,8 @@ void t_get_network_state(); | ||||
| // Helper functions
 | ||||
| int len_list(list *l); | ||||
| 
 | ||||
| void debug_print(char message_debug); | ||||
| 
 | ||||
| neighbour_peer *get_random_neighbour(); | ||||
| 
 | ||||
| #endif | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 n07070
						n07070