Diff for /rpl/src/instructions_o1.c between versions 1.50 and 1.51

version 1.50, 2012/03/01 10:14:06 version 1.51, 2012/04/12 09:56:40
Line 4715  instruction_open(struct_processus *s_eta Line 4715  instruction_open(struct_processus *s_eta
                     = protection;                      = protection;
             (*(*((struct_socket *) (*s_objet_resultat).objet))              (*(*((struct_socket *) (*s_objet_resultat).objet))
                     .format).objet = NULL;                      .format).objet = NULL;
               (*((struct_socket *) (*s_objet_resultat).objet)).adresse = NULL;
   
             switch(type_socket)              switch(type_socket)
             {              {
Line 4978  instruction_open(struct_processus *s_eta Line 4979  instruction_open(struct_processus *s_eta
                                 return;                                  return;
                             }                              }
   
                               free((*((struct_socket *) (*s_objet_resultat)
                                       .objet)).adresse);
   
                             if (((*((struct_socket *) (*s_objet_resultat)                              if (((*((struct_socket *) (*s_objet_resultat)
                                     .objet)).adresse = malloc(22 *                                      .objet)).adresse = malloc(22 *
                                     sizeof(unsigned char))) == NULL)                                      sizeof(unsigned char))) == NULL)
Line 5082  instruction_open(struct_processus *s_eta Line 5086  instruction_open(struct_processus *s_eta
                                 return;                                  return;
                             }                              }
   
                               free((*((struct_socket *) (*s_objet_resultat)
                                       .objet)).adresse);
   
                             if (((*((struct_socket *) (*s_objet_resultat)                              if (((*((struct_socket *) (*s_objet_resultat)
                                     .objet)).adresse = malloc(55 *                                      .objet)).adresse = malloc(55 *
                                     sizeof(unsigned char))) == NULL)                                      sizeof(unsigned char))) == NULL)
Line 5113  instruction_open(struct_processus *s_eta Line 5120  instruction_open(struct_processus *s_eta
                                 printf("+++Warning : IPv6 support "                                  printf("+++Warning : IPv6 support "
                                         "unavailable\n");                                          "unavailable\n");
                             }                              }
   
                               liberation(s_etat_processus, s_objet_argument);
                               liberation(s_etat_processus, s_objet_resultat);
   
                               freeaddrinfo(resolution);
   
                               (*s_etat_processus).erreur_execution =
                                       d_ex_instruction_indisponible;
                               return;
 #                           endif  #                           endif
                         }                          }
   
Line 5127  instruction_open(struct_processus *s_eta Line 5143  instruction_open(struct_processus *s_eta
                     { // Hôte défini par une adresse                      { // Hôte défini par une adresse
                         if (strcmp(protocole, "IPV4") == 0)                          if (strcmp(protocole, "IPV4") == 0)
                         { // Accès en IPv4                          { // Accès en IPv4
                               free((*((struct_socket *) (*s_objet_resultat)
                                       .objet)).adresse);
   
                             if (((*((struct_socket *) (*s_objet_resultat)                              if (((*((struct_socket *) (*s_objet_resultat)
                                     .objet)).adresse = malloc(22 *                                      .objet)).adresse = malloc(22 *
                                     sizeof(unsigned char))) == NULL)                                      sizeof(unsigned char))) == NULL)
Line 5202  instruction_open(struct_processus *s_eta Line 5221  instruction_open(struct_processus *s_eta
                         else                          else
                         { // Accès en IPv6                          { // Accès en IPv6
 #                           ifdef IPV6  #                           ifdef IPV6
                               free((*((struct_socket *) (*s_objet_resultat)
                                       .objet)).adresse);
   
                             if (((*((struct_socket *) (*s_objet_resultat)                              if (((*((struct_socket *) (*s_objet_resultat)
                                     .objet)).adresse = malloc(55 *                                      .objet)).adresse = malloc(55 *
                                     sizeof(unsigned char))) == NULL)                                      sizeof(unsigned char))) == NULL)
Line 5283  instruction_open(struct_processus *s_eta Line 5305  instruction_open(struct_processus *s_eta
                                 printf("+++Warning : IPv6 support "                                  printf("+++Warning : IPv6 support "
                                         "unavailable\n");                                          "unavailable\n");
                             }                              }
                               
                               liberation(s_etat_processus, s_objet_argument);
                               liberation(s_etat_processus, s_objet_resultat);
   
                               (*s_etat_processus).erreur_execution =
                                       d_ex_instruction_indisponible;
                               return;
 #                           endif  #                           endif
                         }                          }
                     }                      }
Line 5516  instruction_open(struct_processus *s_eta Line 5545  instruction_open(struct_processus *s_eta
                                         .socket_en_ecoute = 'N';                                          .socket_en_ecoute = 'N';
                             }                              }
   
                               free((*((struct_socket *) (*s_objet_resultat)
                                       .objet)).adresse);
   
                             if (((*((struct_socket *) (*s_objet_resultat)                              if (((*((struct_socket *) (*s_objet_resultat)
                                     .objet)).adresse = malloc(22 *                                      .objet)).adresse = malloc(22 *
                                     sizeof(unsigned char))) == NULL)                                      sizeof(unsigned char))) == NULL)
Line 5622  instruction_open(struct_processus *s_eta Line 5654  instruction_open(struct_processus *s_eta
                                         .socket_en_ecoute = 'N';                                          .socket_en_ecoute = 'N';
                             }                              }
   
                               free((*((struct_socket *) (*s_objet_resultat)
                                       .objet)).adresse);
   
                             if (((*((struct_socket *) (*s_objet_resultat)                              if (((*((struct_socket *) (*s_objet_resultat)
                                     .objet)).adresse = malloc(55 *                                      .objet)).adresse = malloc(55 *
                                     sizeof(unsigned char))) == NULL)                                      sizeof(unsigned char))) == NULL)
Line 5653  instruction_open(struct_processus *s_eta Line 5688  instruction_open(struct_processus *s_eta
                                 printf("+++Warning : IPv6 support "                                  printf("+++Warning : IPv6 support "
                                         "unavailable\n");                                          "unavailable\n");
                             }                              }
   
                               liberation(s_etat_processus, s_objet_argument);
                               liberation(s_etat_processus, s_objet_resultat);
   
                               freeaddrinfo(resolution);
   
                               (*s_etat_processus).erreur_execution =
                                       d_ex_instruction_indisponible;
                               return;
 #                           endif  #                           endif
                         }                          }
   
Line 5669  instruction_open(struct_processus *s_eta Line 5713  instruction_open(struct_processus *s_eta
                         { // Accès en IPv4                          { // Accès en IPv4
                             if (type_adresse == '4')                              if (type_adresse == '4')
                             {                              {
                                   free((*((struct_socket *) (*s_objet_resultat)
                                           .objet)).adresse);
   
                                 if (((*((struct_socket *) (*s_objet_resultat)                                  if (((*((struct_socket *) (*s_objet_resultat)
                                         .objet)).adresse = malloc(22 *                                          .objet)).adresse = malloc(22 *
                                         sizeof(unsigned char))) == NULL)                                          sizeof(unsigned char))) == NULL)
Line 5698  instruction_open(struct_processus *s_eta Line 5745  instruction_open(struct_processus *s_eta
                             }                              }
                             else                              else
                             {                              {
                                   free((*((struct_socket *) (*s_objet_resultat)
                                           .objet)).adresse);
   
                                 if (((*((struct_socket *) (*s_objet_resultat)                                  if (((*((struct_socket *) (*s_objet_resultat)
                                         .objet)).adresse = malloc(                                          .objet)).adresse = malloc(
                                         sizeof(unsigned char))) == NULL)                                          sizeof(unsigned char))) == NULL)
Line 5765  instruction_open(struct_processus *s_eta Line 5815  instruction_open(struct_processus *s_eta
 #                           ifdef IPV6  #                           ifdef IPV6
                             if (type_adresse == '6')                              if (type_adresse == '6')
                             {                              {
                                   free((*((struct_socket *) (*s_objet_resultat)
                                           .objet)).adresse);
   
                                 if (((*((struct_socket *) (*s_objet_resultat)                                  if (((*((struct_socket *) (*s_objet_resultat)
                                         .objet)).adresse = malloc(55 *                                          .objet)).adresse = malloc(55 *
                                         sizeof(unsigned char))) == NULL)                                          sizeof(unsigned char))) == NULL)
Line 5795  instruction_open(struct_processus *s_eta Line 5848  instruction_open(struct_processus *s_eta
                             }                              }
                             else                              else
                             {                              {
                                   free((*((struct_socket *) (*s_objet_resultat)
                                           .objet)).adresse);
   
                                 if (((*((struct_socket *) (*s_objet_resultat)                                  if (((*((struct_socket *) (*s_objet_resultat)
                                         .objet)).adresse = malloc(                                          .objet)).adresse = malloc(
                                         sizeof(unsigned char))) == NULL)                                          sizeof(unsigned char))) == NULL)
Line 5865  instruction_open(struct_processus *s_eta Line 5921  instruction_open(struct_processus *s_eta
                                 printf("+++Warning : IPv6 support "                                  printf("+++Warning : IPv6 support "
                                         "unavailable\n");                                          "unavailable\n");
                             }                              }
   
                               liberation(s_etat_processus, s_objet_argument);
                               liberation(s_etat_processus, s_objet_resultat);
   
                               (*s_etat_processus).erreur_execution =
                                       d_ex_instruction_indisponible;
                               return;
 #                           endif  #                           endif
                         }                          }
                         else                          else
                         { // Socket UNIX                          { // Socket UNIX
                               free((*((struct_socket *) (*s_objet_resultat)
                                       .objet)).adresse);
   
                             if (((*((struct_socket *) (*s_objet_resultat)                              if (((*((struct_socket *) (*s_objet_resultat)
                                     .objet)).adresse = malloc(                                      .objet)).adresse = malloc(
                                     sizeof(unsigned char))) == NULL)                                      sizeof(unsigned char))) == NULL)

Removed from v.1.50  
changed lines
  Added in v.1.51


CVSweb interface <joel.bertrand@systella.fr>