version 1.35, 2011/09/15 17:51:43
|
version 1.48, 2012/07/03 13:56:32
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.3 |
RPL/2 (R) version 4.1.9 |
Copyright (C) 1989-2011 Dr. BERTRAND Joël |
Copyright (C) 1989-2012 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 247 instruction_send(struct_processus *s_eta
|
Line 247 instruction_send(struct_processus *s_eta
|
attente.tv_sec = 0; |
attente.tv_sec = 0; |
attente.tv_nsec = GRANULARITE_us * 1000; |
attente.tv_nsec = GRANULARITE_us * 1000; |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 257 instruction_send(struct_processus *s_eta
|
Line 261 instruction_send(struct_processus *s_eta
|
(*s_etat_processus).pipe_nombre_objets_attente, |
(*s_etat_processus).pipe_nombre_objets_attente, |
&pid, sizeof(pid))) != sizeof(pid)) |
&pid, sizeof(pid))) != sizeof(pid)) |
{ |
{ |
if (pthread_mutex_lock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
if (errno != EINTR) |
return; |
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
} |
} |
|
|
if (longueur_ecriture == -1) |
if (longueur_ecriture == -1) |
Line 277 instruction_send(struct_processus *s_eta
|
Line 288 instruction_send(struct_processus *s_eta
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_fork)) |
# ifndef SEMAPHORES_NOMMES |
!= 0) |
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 296 instruction_send(struct_processus *s_eta
|
Line 310 instruction_send(struct_processus *s_eta
|
(*s_etat_processus).pipe_nombre_objets_attente, |
(*s_etat_processus).pipe_nombre_objets_attente, |
&pid, sizeof(pid))) != sizeof(pid)) |
&pid, sizeof(pid))) != sizeof(pid)) |
{ |
{ |
if (pthread_mutex_lock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
if (errno != EINTR) |
return; |
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
} |
} |
|
|
if (longueur_ecriture == -1) |
if (longueur_ecriture == -1) |
Line 316 instruction_send(struct_processus *s_eta
|
Line 337 instruction_send(struct_processus *s_eta
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 325 instruction_send(struct_processus *s_eta
|
Line 350 instruction_send(struct_processus *s_eta
|
scrutation_interruptions(s_etat_processus); |
scrutation_interruptions(s_etat_processus); |
} |
} |
|
|
if (pthread_mutex_lock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
if (errno != EINTR) |
return; |
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
} |
} |
} |
} |
else |
else |
Line 343 instruction_send(struct_processus *s_eta
|
Line 375 instruction_send(struct_processus *s_eta
|
} |
} |
} |
} |
|
|
tid = -3; |
tid = (pthread_t) -3; |
|
|
attente.tv_sec = 0; |
attente.tv_sec = 0; |
attente.tv_nsec = GRANULARITE_us * 1000; |
attente.tv_nsec = GRANULARITE_us * 1000; |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 358 instruction_send(struct_processus *s_eta
|
Line 394 instruction_send(struct_processus *s_eta
|
(*s_etat_processus).pipe_nombre_objets_attente, |
(*s_etat_processus).pipe_nombre_objets_attente, |
&tid, sizeof(tid))) != sizeof(tid)) |
&tid, sizeof(tid))) != sizeof(tid)) |
{ |
{ |
while(pthread_mutex_lock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 378 instruction_send(struct_processus *s_eta
|
Line 418 instruction_send(struct_processus *s_eta
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 396 instruction_send(struct_processus *s_eta
|
Line 440 instruction_send(struct_processus *s_eta
|
(*s_etat_processus).pipe_nombre_objets_attente, |
(*s_etat_processus).pipe_nombre_objets_attente, |
&tid, sizeof(tid))) != sizeof(tid)) |
&tid, sizeof(tid))) != sizeof(tid)) |
{ |
{ |
if (pthread_mutex_lock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
if (errno != EINTR) |
return; |
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
} |
} |
|
|
if (longueur_ecriture == -1) |
if (longueur_ecriture == -1) |
Line 416 instruction_send(struct_processus *s_eta
|
Line 467 instruction_send(struct_processus *s_eta
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 425 instruction_send(struct_processus *s_eta
|
Line 480 instruction_send(struct_processus *s_eta
|
scrutation_interruptions(s_etat_processus); |
scrutation_interruptions(s_etat_processus); |
} |
} |
|
|
if (pthread_mutex_lock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 437 instruction_send(struct_processus *s_eta
|
Line 496 instruction_send(struct_processus *s_eta
|
attente.tv_sec = 0; |
attente.tv_sec = 0; |
attente.tv_nsec = GRANULARITE_us * 1000; |
attente.tv_nsec = GRANULARITE_us * 1000; |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 446 instruction_send(struct_processus *s_eta
|
Line 509 instruction_send(struct_processus *s_eta
|
while(read_atomic(s_etat_processus, (*s_etat_processus).pipe_acquittement, |
while(read_atomic(s_etat_processus, (*s_etat_processus).pipe_acquittement, |
&tampon, sizeof(unsigned char)) != sizeof(unsigned char)) |
&tampon, sizeof(unsigned char)) != sizeof(unsigned char)) |
{ |
{ |
if (pthread_mutex_lock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
if (errno != EINTR) |
return; |
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
} |
} |
|
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 464 instruction_send(struct_processus *s_eta
|
Line 538 instruction_send(struct_processus *s_eta
|
scrutation_interruptions(s_etat_processus); |
scrutation_interruptions(s_etat_processus); |
} |
} |
|
|
if (pthread_mutex_lock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
if (errno != EINTR) |
return; |
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
} |
} |
|
|
// Envoi d'un PID invalide (-1) pour ne pas bloquer le thread |
// Envoi d'un PID invalide (-1) pour ne pas bloquer le thread |
Line 480 instruction_send(struct_processus *s_eta
|
Line 561 instruction_send(struct_processus *s_eta
|
attente.tv_sec = 0; |
attente.tv_sec = 0; |
attente.tv_nsec = GRANULARITE_us * 1000; |
attente.tv_nsec = GRANULARITE_us * 1000; |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 490 instruction_send(struct_processus *s_eta
|
Line 575 instruction_send(struct_processus *s_eta
|
(*s_etat_processus).pipe_nombre_interruptions_attente, |
(*s_etat_processus).pipe_nombre_interruptions_attente, |
&pid, sizeof(pid))) != sizeof(pid)) |
&pid, sizeof(pid))) != sizeof(pid)) |
{ |
{ |
if (pthread_mutex_lock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 510 instruction_send(struct_processus *s_eta
|
Line 599 instruction_send(struct_processus *s_eta
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
} |
} |
|
|
if (pthread_mutex_lock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
if (errno != EINTR) |
return; |
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
} |
} |
|
|
scrutation_interruptions(s_etat_processus); |
scrutation_interruptions(s_etat_processus); |
} |
} |
else |
else |
{ |
{ |
tid = -1; |
tid = (pthread_t) -1; |
|
|
attente.tv_sec = 0; |
attente.tv_sec = 0; |
attente.tv_nsec = GRANULARITE_us * 1000; |
attente.tv_nsec = GRANULARITE_us * 1000; |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 542 instruction_send(struct_processus *s_eta
|
Line 646 instruction_send(struct_processus *s_eta
|
(*s_etat_processus).pipe_nombre_interruptions_attente, |
(*s_etat_processus).pipe_nombre_interruptions_attente, |
&tid, sizeof(tid))) != sizeof(tid)) |
&tid, sizeof(tid))) != sizeof(tid)) |
{ |
{ |
if (pthread_mutex_lock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
if (errno != EINTR) |
return; |
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
} |
} |
|
|
if (longueur_ecriture == -1) |
if (longueur_ecriture == -1) |
Line 562 instruction_send(struct_processus *s_eta
|
Line 673 instruction_send(struct_processus *s_eta
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 571 instruction_send(struct_processus *s_eta
|
Line 686 instruction_send(struct_processus *s_eta
|
scrutation_interruptions(s_etat_processus); |
scrutation_interruptions(s_etat_processus); |
} |
} |
|
|
if (pthread_mutex_lock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
if (errno != EINTR) |
return; |
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
} |
} |
} |
} |
|
|
// ecriture_pipe() ne peut être interrompu par un signal. |
// ecriture_pipe() ne peut être interrompu par un signal. |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 589 instruction_send(struct_processus *s_eta
|
Line 715 instruction_send(struct_processus *s_eta
|
if (ecriture_pipe(s_etat_processus, (*s_etat_processus).pipe_donnees, |
if (ecriture_pipe(s_etat_processus, (*s_etat_processus).pipe_donnees, |
s_objet) == d_erreur) |
s_objet) == d_erreur) |
{ |
{ |
if (pthread_mutex_lock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
if (errno != EINTR) |
return; |
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
} |
} |
|
|
if ((*s_etat_processus).profilage == d_vrai) |
if ((*s_etat_processus).profilage == d_vrai) |
Line 604 instruction_send(struct_processus *s_eta
|
Line 737 instruction_send(struct_processus *s_eta
|
return; |
return; |
} |
} |
|
|
if (pthread_mutex_lock(&((*s_etat_processus).mutex_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
if (errno != EINTR) |
return; |
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
} |
} |
|
|
if ((*s_etat_processus).profilage == d_vrai) |
if ((*s_etat_processus).profilage == d_vrai) |
Line 647 instruction_sqlquery(struct_processus *s
|
Line 787 instruction_sqlquery(struct_processus *s
|
{ |
{ |
# define d_LONGUEUR 1024 |
# define d_LONGUEUR 1024 |
|
|
|
# if defined(MYSQL_SUPPORT) || defined(POSTGRESQL_SUPPORT) |
logical1 connexion_permanente; |
logical1 connexion_permanente; |
logical1 presence_resultat; |
# endif |
|
|
struct_objet *s_copie_1; |
struct_objet *s_copie_1; |
struct_objet *s_objet_1; |
struct_objet *s_objet_1; |
struct_objet *s_copie_2; |
struct_objet *s_copie_2; |
struct_objet *s_objet_2; |
struct_objet *s_objet_2; |
struct_objet *s_objet_resultat; |
|
|
|
struct_liste_chainee *l_element_courant; |
|
struct_liste_chainee *l_element_courant_ligne; |
|
|
|
unsigned char *tampon; |
unsigned char *tampon; |
|
|
unsigned int i; |
|
unsigned int j; |
|
unsigned int nombre_colonnes; |
|
unsigned int nombre_lignes; |
|
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
|
|
if ((*s_etat_processus).affichage_arguments == 'Y') |
if ((*s_etat_processus).affichage_arguments == 'Y') |
Line 740 instruction_sqlquery(struct_processus *s
|
Line 872 instruction_sqlquery(struct_processus *s
|
|
|
if ((*s_objet_1).type == LST) |
if ((*s_objet_1).type == LST) |
{ |
{ |
|
# if defined(MYSQL_SUPPORT) || defined(POSTGRESQL_SUPPORT) |
connexion_permanente = d_faux; |
connexion_permanente = d_faux; |
|
# endif |
|
|
s_copie_1 = s_objet_1; |
s_copie_1 = s_objet_1; |
|
|
Line 751 instruction_sqlquery(struct_processus *s
|
Line 885 instruction_sqlquery(struct_processus *s
|
return; |
return; |
} |
} |
|
|
|
if ((*s_etat_processus).erreur_execution == |
|
d_ex_instruction_indisponible) |
|
{ |
|
liberation(s_etat_processus, s_objet_1); |
|
liberation(s_etat_processus, s_objet_2); |
|
liberation(s_etat_processus, s_copie_1); |
|
|
|
return; |
|
} |
|
|
liberation(s_etat_processus, s_copie_1); |
liberation(s_etat_processus, s_copie_1); |
} |
} |
else |
else |
Line 770 instruction_sqlquery(struct_processus *s
|
Line 914 instruction_sqlquery(struct_processus *s
|
} |
} |
} |
} |
|
|
|
# if defined(MYSQL_SUPPORT) || defined(POSTGRESQL_SUPPORT) |
connexion_permanente = d_vrai; |
connexion_permanente = d_vrai; |
|
# endif |
} |
} |
|
|
if (((*s_objet_1).type == SQL) && ((*s_objet_2).type == CHN)) |
if (((*s_objet_1).type == SQL) && ((*s_objet_2).type == CHN)) |
Line 812 instruction_sqlquery(struct_processus *s
|
Line 958 instruction_sqlquery(struct_processus *s
|
{ |
{ |
# ifdef MYSQL_SUPPORT |
# ifdef MYSQL_SUPPORT |
|
|
MYSQL_RES *resultat_mysql; |
unsigned int i; |
MYSQL_ROW ligne; |
unsigned int nombre_colonnes; |
|
|
|
logical1 presence_resultat; |
|
|
|
MYSQL_RES *resultat_mysql; |
|
MYSQL_ROW ligne; |
|
|
|
struct_objet *s_objet_resultat; |
|
|
|
struct_liste_chainee *l_element_courant; |
|
struct_liste_chainee *l_element_courant_ligne; |
|
|
if (mysql_real_query((*((struct_connecteur_sql *) (*s_objet_1) |
if (mysql_real_query((*((struct_connecteur_sql *) (*s_objet_1) |
.objet)).descripteur.mysql, (unsigned char *) (*s_objet_2) |
.objet)).descripteur.mysql, (unsigned char *) (*s_objet_2) |
Line 1015 instruction_sqlquery(struct_processus *s
|
Line 1171 instruction_sqlquery(struct_processus *s
|
{ |
{ |
# ifdef POSTGRESQL_SUPPORT |
# ifdef POSTGRESQL_SUPPORT |
|
|
PGresult *resultat_postgresql; |
unsigned int i; |
|
unsigned int j; |
|
unsigned int nombre_colonnes; |
|
unsigned int nombre_lignes; |
|
|
|
logical1 presence_resultat; |
|
|
|
PGresult *resultat_postgresql; |
|
|
|
struct_objet *s_objet_resultat; |
|
|
|
struct_liste_chainee *l_element_courant; |
|
struct_liste_chainee *l_element_courant_ligne; |
|
|
if (PQstatus((*((struct_connecteur_sql *) (*s_objet_1).objet)) |
if (PQstatus((*((struct_connecteur_sql *) (*s_objet_1).objet)) |
.descripteur.postgresql) != CONNECTION_OK) |
.descripteur.postgresql) != CONNECTION_OK) |