types: Lock all elements we interact with

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2023-10-12 16:51:15 +09:00
parent 7dc04ccb1d
commit e19970b5e0

View file

@ -39,6 +39,7 @@ impl Elem {
new_elem.id.set_name(cstr); new_elem.id.set_name(cstr);
new_elem.val.set_id(&new_elem.id); new_elem.val.set_id(&new_elem.id);
helpers::lock_el(card, &new_elem.id, &new_elem.elem_name);
helpers::read_ev(card, &mut new_elem.val, &new_elem.elem_name); helpers::read_ev(card, &mut new_elem.val, &new_elem.elem_name);
return new_elem; return new_elem;