--- rpl/src/instructions_t2.c 2010/01/26 15:22:45 1.1 +++ rpl/src/instructions_t2.c 2010/08/06 15:26:50 1.13 @@ -1,6 +1,6 @@ /* ================================================================================ - RPL/2 (R) version 4.0.9 + RPL/2 (R) version 4.0.18 Copyright (C) 1989-2010 Dr. BERTRAND Joël This file is part of RPL/2. @@ -20,7 +20,7 @@ */ -#include "rpl.conv.h" +#include "rpl-conv.h" /* @@ -1914,17 +1914,15 @@ instruction_target(struct_processus *s_e .adresse_distante); if (((*((struct_socket *) (*s_objet_argument_1).objet)) - .adresse_distante = malloc((strlen((unsigned char *) - (*s_objet_argument_2).objet) + 1) * sizeof(unsigned char))) - == NULL) + .adresse_distante = transliteration(s_etat_processus, + (unsigned char *) (*s_objet_argument_2).objet, + d_locale, "UTF-8")) == NULL) { - (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; + liberation(s_etat_processus, s_objet_argument_1); + liberation(s_etat_processus, s_objet_argument_2); + return; } - - strcpy((*((struct_socket *) (*s_objet_argument_1).objet)) - .adresse_distante, (unsigned char *) - (*s_objet_argument_2).objet); } else if ((*s_objet_argument_2).type == LST) { @@ -2154,6 +2152,7 @@ instruction_target(struct_processus *s_e else if ((*((struct_socket *) (*s_objet_argument_1).objet)) .domaine == PF_INET6) { // Résolution du nom en IPv6 +# ifdef IPV6 resolution_courante = resolution; while(resolution_courante != NULL) @@ -2201,6 +2200,8 @@ instruction_target(struct_processus *s_e (*resolution_courante).ai_addr)).sin6_addr .s6_addr[i]); } +# else +# endif } else {