Lines Matching refs:ta
139 bio_reset_template_array(fido_bio_template_array_t *ta) in bio_reset_template_array() argument
141 for (size_t i = 0; i < ta->n_alloc; i++) in bio_reset_template_array()
142 bio_reset_template(&ta->ptr[i]); in bio_reset_template_array()
144 free(ta->ptr); in bio_reset_template_array()
145 ta->ptr = NULL; in bio_reset_template_array()
146 memset(ta, 0, sizeof(*ta)); in bio_reset_template_array()
173 fido_bio_template_array_t *ta = arg; in decode_template_array() local
181 if (ta->n_rx >= ta->n_alloc) { in decode_template_array()
186 if (cbor_map_iter(item, &ta->ptr[ta->n_rx], decode_template) < 0) { in decode_template_array()
191 ta->n_rx++; in decode_template_array()
200 fido_bio_template_array_t *ta = arg; in bio_parse_template_array() local
215 if (ta->ptr != NULL || ta->n_alloc != 0 || ta->n_rx != 0) { in bio_parse_template_array()
221 if ((ta->ptr = calloc(cbor_array_size(val), sizeof(*ta->ptr))) == NULL) in bio_parse_template_array()
224 ta->n_alloc = cbor_array_size(val); in bio_parse_template_array()
226 if (cbor_array_iter(val, ta, decode_template_array) < 0) { in bio_parse_template_array()
235 bio_rx_template_array(fido_dev_t *dev, fido_bio_template_array_t *ta, int *ms) in bio_rx_template_array() argument
241 bio_reset_template_array(ta); in bio_rx_template_array()
254 if ((r = cbor_parse_reply(msg, (size_t)msglen, ta, in bio_rx_template_array()
268 bio_get_template_array_wait(fido_dev_t *dev, fido_bio_template_array_t *ta, in bio_get_template_array_wait() argument
274 (r = bio_rx_template_array(dev, ta, ms)) != FIDO_OK) in bio_get_template_array_wait()
281 fido_bio_dev_get_template_array(fido_dev_t *dev, fido_bio_template_array_t *ta, in fido_bio_dev_get_template_array() argument
289 return (bio_get_template_array_wait(dev, ta, pin, &ms)); in fido_bio_dev_get_template_array()
758 fido_bio_template_array_count(const fido_bio_template_array_t *ta) in fido_bio_template_array_count() argument
760 return (ta->n_rx); in fido_bio_template_array_count()
778 fido_bio_template_array_t *ta; in fido_bio_template_array_free() local
780 if (tap == NULL || (ta = *tap) == NULL) in fido_bio_template_array_free()
783 bio_reset_template_array(ta); in fido_bio_template_array_free()
784 free(ta); in fido_bio_template_array_free()
826 fido_bio_template(const fido_bio_template_array_t *ta, size_t idx) in fido_bio_template() argument
828 if (idx >= ta->n_alloc) in fido_bio_template()
831 return (&ta->ptr[idx]); in fido_bio_template()