1
0
mirror of https://gitlab.com/klmp200/LO41.git synced 2025-07-12 04:39:23 +00:00
This commit is contained in:
Aethor
2018-06-20 22:11:48 +02:00
parent 7315e1595e
commit f066e22419
2 changed files with 3 additions and 3 deletions

View File

@ -168,8 +168,8 @@ void go_to_floor_Building(THIS(Building), int origin, int destination, Passenger
this->waiting_passengers->insert_tail(this->waiting_passengers, (void*) passenger, sizeof(Passenger));//todo : check if inside list
}
pthread_cond_wait(this->condition_floors[origin], this->mutex_cond_get_inside_elevator);
elevator_number = this->get_inside_elevator(this, origin, passenger);
elevator_number = this->get_inside_elevator(this, origin, passenger);
if (elevator_number != -1){ //passenger accepted in elevator
if (passenger->type == RESIDENT)
printf("Le résident %s rentre dans l'ascenseur %s depuis l'étage %d\n", passenger->get_name(passenger),
@ -191,7 +191,7 @@ void go_to_floor_Building(THIS(Building), int origin, int destination, Passenger
else if (passenger->type == VISITOR)
printf("Le visiteur %s à l'étage %d n'a pas pu rentrer dans un ascenseur. Préempté !\n", passenger->get_name(passenger), origin);
//reloading fire
this->go_to_floor(this, origin, destination, passenger);
//this->go_to_floor(this, origin, destination, passenger);
}
}