| 125 | } |
| 126 | |
| 127 | AP_DECLARE(apr_array_header_t *) ap_list_provider_names(apr_pool_t *pool, |
| 128 | const char *provider_group, |
| 129 | const char *provider_version) |
| 130 | { |
| 131 | apr_array_header_t *ret = NULL; |
| 132 | ap_list_provider_names_t *entry; |
| 133 | apr_hash_t *provider_group_hash, *h; |
| 134 | apr_hash_index_t *hi; |
| 135 | char *val; |
| 136 | |
| 137 | if (global_providers_names == NULL) { |
| 138 | goto out; |
| 139 | } |
| 140 | |
| 141 | provider_group_hash = apr_hash_get(global_providers_names, provider_group, |
| 142 | APR_HASH_KEY_STRING); |
| 143 | |
| 144 | if (provider_group_hash == NULL) { |
| 145 | goto out; |
| 146 | } |
| 147 | |
| 148 | h = apr_hash_get(provider_group_hash, provider_version, APR_HASH_KEY_STRING); |
| 149 | |
| 150 | if (h == NULL) { |
| 151 | goto out; |
| 152 | } |
| 153 | |
| 154 | ret = apr_array_make(pool, apr_hash_count(h), sizeof(ap_list_provider_names_t)); |
| 155 | for (hi = apr_hash_first(pool, h); hi; hi = apr_hash_next(hi)) { |
| 156 | apr_hash_this(hi, NULL, NULL, (void *)&val); |
| 157 | entry = apr_array_push(ret); |
| 158 | entry->provider_name = apr_pstrdup(pool, val); |
| 159 | } |
| 160 | |
| 161 | out: |
| 162 | if (ret == NULL) { |
| 163 | ret = apr_array_make(pool, 1, sizeof(ap_list_provider_names_t)); |
| 164 | } |
| 165 | return ret; |
| 166 | } |
| 167 | |
| 168 | AP_DECLARE(apr_array_header_t *) ap_list_provider_groups(apr_pool_t *pool) |
| 169 | { |
no outgoing calls
no test coverage detected