version 1.4, 2010/03/04 10:17:52
|
version 1.6, 2010/03/05 11:20:08
|
Line 968 instruction_recall(struct_processus *s_e
|
Line 968 instruction_recall(struct_processus *s_e
|
struct_objet *s_objet_temporaire; |
struct_objet *s_objet_temporaire; |
|
|
unsigned char *commande; |
unsigned char *commande; |
|
unsigned char *executable_candidat; |
unsigned char *instructions = "%s/bin/rpliconv %s " |
unsigned char *instructions = "%s/bin/rpliconv %s " |
"`%s/bin/rplfile " |
"`%s/bin/rplfile " |
"-m %s/share/rplfiles -i %s | awk " |
"-m %s/share/rplfiles -i %s | awk " |
Line 1044 instruction_recall(struct_processus *s_e
|
Line 1045 instruction_recall(struct_processus *s_e
|
return; |
return; |
} |
} |
|
|
if ((commande = malloc((strlen(ds_preprocesseur) + |
if ((*s_etat_processus).rpl_home == NULL) |
(2 * strlen((unsigned char *) (*s_objet).objet)) + |
|
(4 * strlen(d_exec_path)) + |
|
strlen(nom_fichier_temporaire) + strlen(instructions) - 11) * |
|
sizeof(unsigned char))) == NULL) |
|
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
if ((commande = malloc((strlen(ds_preprocesseur) + |
return; |
(2 * strlen((unsigned char *) (*s_objet).objet)) + |
|
(4 * strlen(d_exec_path)) + |
|
strlen(nom_fichier_temporaire) + strlen(instructions) - 11) |
|
* sizeof(unsigned char))) == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
sprintf(commande, instructions, d_exec_path, |
|
(unsigned char *) (*s_objet).objet, |
|
d_exec_path, d_exec_path, |
|
(unsigned char *) (*s_objet).objet, |
|
d_exec_path, ds_preprocesseur, nom_fichier_temporaire); |
|
|
|
if (alsprintf(&executable_candidat, "%s/bin/rpliconv", |
|
d_exec_path) < 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "md5", |
|
rpliconv_md5) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "sha1", |
|
rpliconv_sha1) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
free(executable_candidat); |
|
|
|
if (alsprintf(&executable_candidat, "%s/bin/rplfile", |
|
d_exec_path) < 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "md5", |
|
rplfile_md5) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "sha1", |
|
rplfile_sha1) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
free(executable_candidat); |
|
|
|
if (alsprintf(&executable_candidat, "%s/bin/rplpp", |
|
d_exec_path) < 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "md5", |
|
rplpp_md5) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "sha1", |
|
rplpp_sha1) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
free(executable_candidat); |
} |
} |
|
else |
|
{ |
|
if ((commande = malloc((strlen(ds_preprocesseur) + |
|
(2 * strlen((unsigned char *) (*s_objet).objet)) + |
|
(4 * strlen((*s_etat_processus).rpl_home)) + |
|
strlen(nom_fichier_temporaire) + strlen(instructions) - 11) |
|
* sizeof(unsigned char))) == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
sprintf(commande, instructions, (*s_etat_processus).rpl_home, |
|
(unsigned char *) (*s_objet).objet, |
|
(*s_etat_processus).rpl_home, (*s_etat_processus).rpl_home, |
|
(unsigned char *) (*s_objet).objet, |
|
(*s_etat_processus).rpl_home, ds_preprocesseur, |
|
nom_fichier_temporaire); |
|
|
|
if (alsprintf(&executable_candidat, "%s/bin/rpliconv", |
|
(*s_etat_processus).rpl_home) < 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "md5", |
|
rpliconv_md5) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "sha1", |
|
rpliconv_sha1) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
free(executable_candidat); |
|
|
|
if (alsprintf(&executable_candidat, "%s/bin/rplfile", |
|
(*s_etat_processus).rpl_home) < 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "md5", |
|
rplfile_md5) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "sha1", |
|
rplfile_sha1) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
free(executable_candidat); |
|
|
|
if (alsprintf(&executable_candidat, "%s/bin/rplpp", |
|
(*s_etat_processus).rpl_home) < 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "md5", |
|
rplpp_md5) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "sha1", |
|
rplpp_sha1) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
sprintf(commande, instructions, d_exec_path, |
free(executable_candidat); |
(unsigned char *) (*s_objet).objet, |
} |
d_exec_path, d_exec_path, (unsigned char *) (*s_objet).objet, |
|
d_exec_path, ds_preprocesseur, nom_fichier_temporaire); |
|
|
|
if ((pipe = popen(commande, "r")) == NULL) |
if ((pipe = popen(commande, "r")) == NULL) |
{ |
{ |