Commit 967fa4831638f73f0bb833362b256ea01525afcd
1 parent
1a2c5f60
Modifs finales
Showing
5 changed files
with
7 additions
and
4 deletions
Show diff stats
Threads/threadSocket.c
... | ... | @@ -118,7 +118,7 @@ int interfaceReponse(FILE* sockdial_stream, char packet[BUFF_SIZE], Arg_Thread* |
118 | 118 | return -1; |
119 | 119 | } |
120 | 120 | |
121 | - /* | |
121 | + | |
122 | 122 | strcpy(buffer, "\x60\x00"); // Demande la commande en mémoire |
123 | 123 | |
124 | 124 | fprintf(sockdial_stream, "%s", buffer); // Transmission du message |
... | ... | @@ -129,13 +129,16 @@ int interfaceReponse(FILE* sockdial_stream, char packet[BUFF_SIZE], Arg_Thread* |
129 | 129 | |
130 | 130 | |
131 | 131 | if( strlen(packet)>=2 && (packet[0]&0xE0)==0x10 ) |
132 | - interfaces[i]->commande = (packet[0]&0x01)*256+packet[1]; | |
132 | + argument->interfaces[i]->commande = (packet[0]&0x01)*256+packet[1]; | |
133 | 133 | else |
134 | 134 | { |
135 | - interfaces[i]->commande = -1; | |
135 | + argument->interfaces[i]->commande = -1; | |
136 | 136 | return -1; // Si le message n'est pas reçu correctement |
137 | 137 | } |
138 | - */ | |
138 | + | |
139 | + strcpy(buffer, "\xE0\x00"); // Signale la fin de l'interrogation | |
140 | + | |
141 | + fprintf(sockdial_stream, "%s", buffer); // Transmission du message | |
139 | 142 | |
140 | 143 | |
141 | 144 | pthread_mutex_unlock(&(argument->requete_mutex)); // Libération de la section critique | ... | ... |
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type