--- rpl/src/instructions_r4.c 2012/05/21 17:25:44 1.53 +++ rpl/src/instructions_r4.c 2012/06/18 15:15:31 1.54 @@ -874,6 +874,8 @@ instruction_read(struct_processus *s_eta struct flock lock; + struct pollfd poll_fd; + struct sockaddr_un adresse_unix; struct sockaddr_in adresse_ipv4; # ifdef IPV6 @@ -2264,7 +2266,6 @@ printf("L=%d\n", longueur_enregistrement tampon_lecture, longueur_questure, MSG_PEEK | MSG_DONTWAIT, (struct sockaddr *) &adresse_ipv6, &longueur_adresse); - # else if ((*s_etat_processus).langue == 'F') { @@ -2417,6 +2418,16 @@ printf("L=%d\n", longueur_enregistrement { if (longueur_effective < longueur_questure) { + poll_fd.fd = (*((struct_socket *) + (*s_objet_argument_1).objet)).socket; + poll_fd.events = POLLIN; + + if (poll(&poll_fd, 1, 0) > 0) + { + free(tampon_lecture); + continue; + } + liberation(s_etat_processus, s_objet_argument_1); free(tampon_lecture);