------------------------------------------------------------------------- RecRegisterConfig -------------------------------------------------------------------------
| 737 | // RecRegisterConfig |
| 738 | //------------------------------------------------------------------------- |
| 739 | RecRecord * |
| 740 | RecRegisterConfig(RecT rec_type, const char *name, RecDataT data_type, RecData data_default, RecUpdateT update_type, |
| 741 | RecCheckT check_type, const char *check_expr, RecSourceT source, RecAccessT access_type) |
| 742 | { |
| 743 | RecRecord *r; |
| 744 | bool updated_p; |
| 745 | |
| 746 | ink_rwlock_wrlock(&g_records_rwlock); |
| 747 | if ((r = register_record(rec_type, name, data_type, data_default, RECP_NULL, &updated_p)) != nullptr) { |
| 748 | // Note: do not modify 'record->config_meta.update_required' |
| 749 | r->config_meta.update_type = update_type; |
| 750 | r->config_meta.check_type = check_type; |
| 751 | |
| 752 | ats_free(r->config_meta.check_expr); |
| 753 | |
| 754 | r->config_meta.check_expr = ats_strdup(check_expr); |
| 755 | r->config_meta.update_cb_list = nullptr; |
| 756 | r->config_meta.access_type = access_type; |
| 757 | if (!updated_p) { |
| 758 | r->config_meta.source = source; |
| 759 | } |
| 760 | } |
| 761 | ink_rwlock_unlock(&g_records_rwlock); |
| 762 | |
| 763 | return r; |
| 764 | } |
| 765 | |
| 766 | //------------------------------------------------------------------------- |
| 767 | // RecGetRecord_Xmalloc |
nothing calls this directly
no test coverage detected