mirror of
https://gitlab.com/klmp200/LO41.git
synced 2024-11-22 00:33:22 +00:00
Corrected a simple but deadly bug #bugcatcher
This commit is contained in:
parent
8bf2b3358d
commit
60265a22f5
@ -42,7 +42,7 @@ int get_number_of_passengers_Elevator(THIS(Elevator)){
|
||||
int num;
|
||||
pthread_mutex_lock(&this->mutex_passenger);
|
||||
num = this->passenger_ids->get_size(this->passenger_ids);
|
||||
pthread_mutex_lock(&this->mutex_passenger);
|
||||
pthread_mutex_unlock(&this->mutex_passenger);
|
||||
return num;
|
||||
}
|
||||
|
||||
@ -103,4 +103,4 @@ Elevator *_init_Elevator(char * name){
|
||||
new_elevator->set_state(new_elevator, WAITING);
|
||||
|
||||
return new_elevator;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user