version 1.9, 2010/03/09 09:19:49
|
version 1.19, 2010/08/06 15:26:49
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.12 |
RPL/2 (R) version 4.0.18 |
Copyright (C) 1989-2010 Dr. BERTRAND Joël |
Copyright (C) 1989-2010 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
Line 20
|
Line 20
|
*/ |
*/ |
|
|
|
|
#include "rpl.conv.h" |
#include "rpl-conv.h" |
|
|
|
|
/* |
/* |
Line 874 instruction_read(struct_processus *s_eta
|
Line 874 instruction_read(struct_processus *s_eta
|
|
|
struct sockaddr_un adresse_unix; |
struct sockaddr_un adresse_unix; |
struct sockaddr_in adresse_ipv4; |
struct sockaddr_in adresse_ipv4; |
|
# ifdef IPV6 |
struct sockaddr_in6 adresse_ipv6; |
struct sockaddr_in6 adresse_ipv6; |
|
# endif |
|
|
struct timespec attente; |
struct timespec attente; |
|
|
Line 1913 instruction_read(struct_processus *s_eta
|
Line 1915 instruction_read(struct_processus *s_eta
|
return; |
return; |
} |
} |
|
|
|
# ifndef SEMAPHORES_NOMMES |
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
# endif |
|
|
for(;;) |
for(;;) |
{ |
{ |
Line 1944 instruction_read(struct_processus *s_eta
|
Line 1954 instruction_read(struct_processus *s_eta
|
else if ((*((struct_socket *) (*s_objet_argument_1).objet)) |
else if ((*((struct_socket *) (*s_objet_argument_1).objet)) |
.domaine == PF_INET6) |
.domaine == PF_INET6) |
{ |
{ |
|
# ifdef IPV6 |
longueur_adresse = sizeof(adresse_ipv6); |
longueur_adresse = sizeof(adresse_ipv6); |
longueur_effective = recvfrom((*((struct_socket *) |
longueur_effective = recvfrom((*((struct_socket *) |
(*s_objet_argument_1).objet)).socket, |
(*s_objet_argument_1).objet)).socket, |
tampon_lecture, longueur_questure, |
tampon_lecture, longueur_questure, |
MSG_PEEK | MSG_DONTWAIT, (struct sockaddr *) |
MSG_PEEK | MSG_DONTWAIT, (struct sockaddr *) |
&adresse_ipv6, &longueur_adresse); |
&adresse_ipv6, &longueur_adresse); |
|
# else |
|
# endif |
} |
} |
else |
else |
{ |
{ |
free(tampon_lecture); |
free(tampon_lecture); |
liberation(s_etat_processus, s_objet_argument_1); |
liberation(s_etat_processus, s_objet_argument_1); |
|
|
|
# ifndef SEMAPHORES_NOMMES |
while(sem_wait(&((*s_etat_processus) |
while(sem_wait(&((*s_etat_processus) |
.semaphore_fork)) == -1) |
.semaphore_fork)) == -1) |
|
# else |
|
while(sem_wait((*s_etat_processus) |
|
.semaphore_fork) == -1) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 1985 instruction_read(struct_processus *s_eta
|
Line 2003 instruction_read(struct_processus *s_eta
|
} |
} |
} |
} |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) |
# ifndef SEMAPHORES_NOMMES |
== -1) |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) == -1) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 2273 instruction_read(struct_processus *s_eta
|
Line 2294 instruction_read(struct_processus *s_eta
|
else if ((*((struct_socket *) (*s_objet_argument_1).objet)) |
else if ((*((struct_socket *) (*s_objet_argument_1).objet)) |
.domaine == PF_INET6) |
.domaine == PF_INET6) |
{ |
{ |
|
# ifdef IPV6 |
longueur_adresse = sizeof(adresse_ipv6); |
longueur_adresse = sizeof(adresse_ipv6); |
recvfrom((*((struct_socket *) |
recvfrom((*((struct_socket *) |
(*s_objet_argument_1).objet)).socket, tampon_lecture, |
(*s_objet_argument_1).objet)).socket, tampon_lecture, |
Line 2339 instruction_read(struct_processus *s_eta
|
Line 2361 instruction_read(struct_processus *s_eta
|
|
|
(*(*((struct_liste_chainee *) (*s_objet_adresse).objet)) |
(*(*((struct_liste_chainee *) (*s_objet_adresse).objet)) |
.suivant).suivant = NULL; |
.suivant).suivant = NULL; |
|
# else |
|
# endif |
} |
} |
else |
else |
{ |
{ |