From 259ac54f327a7af45c73d4fac95c1d3893b20d3f Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Fri, 10 Oct 2008 13:00:34 +0000 Subject: [PATCH] Corrections mineures et commentaires git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@77 785a6c6c-259e-4ff1-8b91-dc31627914f0 --- .../owlps-aggregator/owlps-aggregatord.c | 14 +++++++------- infrastructure-centred/owlps-client/owlps-client.c | 6 +++--- libowlps/Makefile | 4 ++-- mobile-centred/Makefile | 2 +- mobile-centred/librtapscanmob/Makefile | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c b/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c index 8e24071..f8ea8b9 100644 --- a/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c +++ b/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c @@ -217,7 +217,7 @@ void got_couple_info(couple_list **couples, couple_message message) { couple_list *tmp_couple = NULL ; couple_info_list *tmp_info = NULL ; - struct timeval start_time ; // Heure de réception du paquet + struct timeval start_time ; // Heure de réception du paquet par l'agrégateur gettimeofday(&start_time, NULL) ; @@ -235,7 +235,7 @@ void got_couple_info(couple_list **couples, couple_message message) tmp_couple = malloc(sizeof(couple_list)) ; // on la crée. memcpy(tmp_couple->mobile_mac_addr_bytes, message.mobile_mac_addr_bytes, 6) ; tmp_couple->request_time = message.request_time ; - tmp_couple->start_time = start_time ; + tmp_couple->start_time = start_time ; // Enregistrement de la date locale de l'agrégateur et non de la date de réception de la demande sur l'AP tmp_couple->x_position = message.x_position ; tmp_couple->y_position = message.y_position ; tmp_couple->z_position = message.z_position ; @@ -260,7 +260,7 @@ void got_couple_info(couple_list **couples, couple_message message) tmp_couple = malloc(sizeof(couple_list)) ; // on crée un nouveau couple. memcpy(tmp_couple->mobile_mac_addr_bytes, message.mobile_mac_addr_bytes, 6) ; tmp_couple->request_time = message.request_time ; - tmp_couple->start_time = start_time ; + tmp_couple->start_time = start_time ; // Enregistrement de la date locale de l'agrégateur et non de la date de réception de la demande sur l'AP tmp_couple->x_position = message.x_position ; tmp_couple->y_position = message.y_position ; tmp_couple->z_position = message.z_position ; @@ -333,12 +333,12 @@ void print_couple_list(couple_list *couples) mobile_mac_string = mac_bytes_to_string(couple_ptr->mobile_mac_addr_bytes) ; printf("MAC du mobile : %s\n\ -Numéro de séquence : %lu\n\ -Heure de réception de la demande de localisation : %lu\n\ +Numéro de séquence : %llu\n\ +Heure de réception de la demande de localisation : %llu\n\ \n", mobile_mac_string, - couple_ptr->request_time.tv_usec, - couple_ptr->start_time.tv_usec + timeval_to_ms(couple_ptr->request_time), + timeval_to_ms(couple_ptr->start_time), ) ; free(mobile_mac_string) ; diff --git a/infrastructure-centred/owlps-client/owlps-client.c b/infrastructure-centred/owlps-client/owlps-client.c index 986e6b8..2bb985e 100644 --- a/infrastructure-centred/owlps-client/owlps-client.c +++ b/infrastructure-centred/owlps-client/owlps-client.c @@ -8,9 +8,9 @@ #define DEBUG /* Codes d'erreurs */ -#define ERR_CREATING_SOCKET 1 -#define ERR_BAD_NUMBER_OF_ARGS 2 -#define ERR_SENDING_INFO 3 +#define ERR_CREATING_SOCKET 1 // Erreur lors de la création de la socket d'envoi +#define ERR_BAD_NUMBER_OF_ARGS 2 // Mauvais nombre d'arguments lors de l'appel au programme +#define ERR_SENDING_INFO 3 // Erreur lors de l'envoi de l'une des demandes de positionnement /* Nombre d'arguments du programme */ #define ARGC_NORMAL 2 diff --git a/libowlps/Makefile b/libowlps/Makefile index 55fde7b..8cf40e2 100644 --- a/libowlps/Makefile +++ b/libowlps/Makefile @@ -75,7 +75,7 @@ install-dynamic : install-header $(DYNAMIC) chmod 644 $(INSTALL_LIB)/$(DYNAMIC) &&\ chown root:root $(INSTALL_LIB)/$(DYNAMIC) &&\ cd $(INSTALL_LIB) && $(SYMLINK) $(DYNAMIC) $(LIB_CIBLE).so &&\ - echo -e "\n!!! Installation de la bibliothèque dynamique effectuée avec succès.\n!!! Ajoutez une ligne « $(INSTALL_LIB) » dans le fichier /etc/ld.so.conf\n ou dans un nouveau fichier de /etc/ld.so.conf.d/, si ce n'est déjà fait.\n!!! Exécutez ldconfig ensuite.\n" + echo "Reconstruction du cache pour ld.so : ldconfig $(INSTALL_LIB)" ; ldconfig $(INSTALL_LIB) install-static : install-header $(STATIC) @$(CP) $(STATIC) $(INSTALL_LIB) &&\ @@ -94,7 +94,7 @@ uninstall : uninstall-dynamic uninstall-static uninstall-dynamic : uninstall-header @$(RM) $(INSTALL_LIB)/$(DYNAMIC) $(INSTALL_LIB)/$(LIB_CIBLE).so - ldconfig + @echo "Reconstruction du cache pour ld.so : ldconfig" ; ldconfig uninstall-static : uninstall-header @$(RM) $(INSTALL_LIB)/$(STATIC) diff --git a/mobile-centred/Makefile b/mobile-centred/Makefile index b7511bc..472f476 100644 --- a/mobile-centred/Makefile +++ b/mobile-centred/Makefile @@ -36,7 +36,7 @@ clean : @make -C librtapscanmob clean @make -C mobile clean -purge : clean +purge : @make -C librtapscanmob purge @make -C mobile purge diff --git a/mobile-centred/librtapscanmob/Makefile b/mobile-centred/librtapscanmob/Makefile index bdd1591..1a39cdc 100644 --- a/mobile-centred/librtapscanmob/Makefile +++ b/mobile-centred/librtapscanmob/Makefile @@ -71,7 +71,7 @@ install-dynamic : install-header $(DYNAMIC) @$(CP) $(DYNAMIC) $(INSTALL_LIB) &&\ chmod 644 $(INSTALL_LIB)/$(DYNAMIC) &&\ chown root:root $(INSTALL_LIB)/$(DYNAMIC) &&\ - echo -e "\n!!! Installation de la bibliothèque dynamique effectuée avec succès.\n!!! Ajoutez une ligne « $(INSTALL_LIB) » dans le fichier /etc/ld.so.conf\n ou dans un nouveau fichier de /etc/ld.so.conf.d/, si ce n'est déjà fait.\n!!! Exécutez ldconfig ensuite.\n" + echo "Reconstruction du cache pour ld.so : ldconfig $(INSTALL_LIB)" ; ldconfig $(INSTALL_LIB) install-static : install-header $(STATIC) @$(CP) $(STATIC) $(INSTALL_LIB) &&\ @@ -90,7 +90,7 @@ uninstall : uninstall-static uninstall-dynamic uninstall-dynamic : uninstall-header @$(RM) $(INSTALL_LIB)/$(DYNAMIC) - ldconfig + @echo "Reconstruction du cache pour ld.so : ldconfig" ; ldconfig uninstall-static : uninstall-header @$(RM) $(INSTALL_LIB)/$(STATIC)