From 967fa4831638f73f0bb833362b256ea01525afcd Mon Sep 17 00:00:00 2001 From: skhinach Date: Fri, 26 Apr 2019 11:40:40 +0200 Subject: [PATCH] Modifs finales --- Threads/threadSocket.c | 11 +++++++---- bin/serverTCP | Bin 0 -> 42312 bytes bin/sonde | Bin 0 -> 30904 bytes libs/libnet.a | Bin 0 -> 43992 bytes libs/libthrd.a | Bin 0 -> 29758 bytes 5 files changed, 7 insertions(+), 4 deletions(-) create mode 100755 bin/serverTCP create mode 100755 bin/sonde create mode 100644 libs/libnet.a create mode 100644 libs/libthrd.a diff --git a/Threads/threadSocket.c b/Threads/threadSocket.c index 4a9fa43..3c2e86f 100755 --- a/Threads/threadSocket.c +++ b/Threads/threadSocket.c @@ -118,7 +118,7 @@ int interfaceReponse(FILE* sockdial_stream, char packet[BUFF_SIZE], Arg_Thread* return -1; } - /* + strcpy(buffer, "\x60\x00"); // Demande la commande en mémoire fprintf(sockdial_stream, "%s", buffer); // Transmission du message @@ -129,13 +129,16 @@ int interfaceReponse(FILE* sockdial_stream, char packet[BUFF_SIZE], Arg_Thread* if( strlen(packet)>=2 && (packet[0]&0xE0)==0x10 ) - interfaces[i]->commande = (packet[0]&0x01)*256+packet[1]; + argument->interfaces[i]->commande = (packet[0]&0x01)*256+packet[1]; else { - interfaces[i]->commande = -1; + argument->interfaces[i]->commande = -1; return -1; // Si le message n'est pas reçu correctement } - */ + + strcpy(buffer, "\xE0\x00"); // Signale la fin de l'interrogation + + fprintf(sockdial_stream, "%s", buffer); // Transmission du message pthread_mutex_unlock(&(argument->requete_mutex)); // Libération de la section critique diff --git a/bin/serverTCP b/bin/serverTCP new file mode 100755 index 0000000..6e4736c Binary files /dev/null and b/bin/serverTCP differ diff --git a/bin/sonde b/bin/sonde new file mode 100755 index 0000000..49fd3c0 Binary files /dev/null and b/bin/sonde differ diff --git a/libs/libnet.a b/libs/libnet.a new file mode 100644 index 0000000..c952283 Binary files /dev/null and b/libs/libnet.a differ diff --git a/libs/libthrd.a b/libs/libthrd.a new file mode 100644 index 0000000..10b03fd Binary files /dev/null and b/libs/libthrd.a differ -- libgit2 0.21.2