Branch
Hash :
94046104
Author :
Thomas de Grivel
Date :
2020-02-24T15:19:27
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
#include <stdio.h>
#include"client_of_server_common.h"
void display_list_output(client_of_server *cos)
{
Pw13_List *current_elt;
current_elt = cos->network_outputs;
if (!current_elt)
printf("nul");
while (current_elt) {
printf ("%p \n", ((output_server *)current_elt)->output);
current_elt = current_elt->suiv;
}
}
void seek_and_destroy_patch_client_of_server (client_of_server *cos,
Pw13_Patch *patch)
{
int i = 0;
Pw13_List *pere_output;
Pw13_List *output_courant;
i = patch->nb_outputs;
display_list_output(cos);
while (i) {
pere_output = NULL;
output_courant = cos->network_outputs;
while (output_courant &&
((((output_server *)output_courant)->output) != (patch->output+i)) ){
pere_output = output_courant;
output_courant = output_courant->suiv;
}
if (output_courant){
pere_output->suiv = output_courant->suiv;
/* pthread_exit(output_courant->*pthread_id); */
free(output_courant);
output_courant = pere_output->suiv;
}
i--;
}
/* regler son compte au different thread */
display_list_output(cos);
}