--- rpl/src/instructions_r4.c 2011/04/17 14:01:23 1.28.2.3 +++ rpl/src/instructions_r4.c 2011/04/18 08:40:11 1.28.2.5 @@ -2034,11 +2034,9 @@ instruction_read(struct_processus *s_eta } } -printf("<1>\n"); if ((*((struct_socket *) (*s_objet_argument_1).objet)).binaire == 'N') { // Socket formatée longueur_questure = 256; -printf("<2>\n"); do { @@ -2099,6 +2097,7 @@ printf("<2>\n"); tampon_lecture, longueur_questure, MSG_PEEK | MSG_DONTWAIT, (struct sockaddr *) &adresse_ipv6, &longueur_adresse); + # else if ((*s_etat_processus).langue == 'F') { @@ -2138,15 +2137,17 @@ printf("<2>\n"); return; } - if (longueur_effective <= 0) + if (longueur_effective < 0) { nanosleep(&attente, NULL); INCR_GRANULARITE(attente.tv_nsec); scrutation_injection(s_etat_processus); } + // Une donnée a été reçue. + if (((*s_etat_processus).var_volatile_requete_arret == -1) - || (longueur_effective > 0)) + || (longueur_effective >= 0)) { break; } @@ -2358,7 +2359,6 @@ printf("<2>\n"); (*s_objet_argument_1).objet)).socket, tampon_lecture, longueur_effective, MSG_DONTWAIT, NULL, &longueur_adresse); -printf("<%s>\n", tampon_lecture); (*s_objet_adresse).objet = NULL; }