1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
if (neighbor->id == header->src) {
struct ID_REQUEST* id_req = malloc(sizeof(struct ID_REQUEST *));
if (id_req != NULL ) {
id_req->Entier=nodedata->seq;
id_req->suivant = NULL;
}
else { printf ("\n espace mémoire non suffisant \n");}
if (neighbor->id_req == NULL){
neighbor->id_req = id_req;
printf ("\n hello1 \n");
}
else {
printf ("\n hello2 \n");
struct ID_REQUEST* temp=neighbor->id_req;
while(temp->suivant != NULL)
{
temp = temp->suivant;
}
temp->suivant = id_req;
} |