* mod_cache_socache configuration directives handlers. */
| 1228 | * mod_cache_socache configuration directives handlers. |
| 1229 | */ |
| 1230 | static const char *set_cache_socache(cmd_parms *cmd, void *in_struct_ptr, |
| 1231 | const char *arg) |
| 1232 | { |
| 1233 | cache_socache_conf *conf = ap_get_module_config(cmd->server->module_config, |
| 1234 | &cache_socache_module); |
| 1235 | cache_socache_provider_conf *provider = conf->provider |
| 1236 | = apr_pcalloc(cmd->pool, sizeof(cache_socache_provider_conf)); |
| 1237 | |
| 1238 | const char *err = NULL, *sep, *name; |
| 1239 | |
| 1240 | /* Argument is of form 'name:args' or just 'name'. */ |
| 1241 | sep = ap_strchr_c(arg, ':'); |
| 1242 | if (sep) { |
| 1243 | name = apr_pstrmemdup(cmd->pool, arg, sep - arg); |
| 1244 | sep++; |
| 1245 | provider->args = sep; |
| 1246 | } |
| 1247 | else { |
| 1248 | name = arg; |
| 1249 | } |
| 1250 | |
| 1251 | provider->socache_provider = ap_lookup_provider(AP_SOCACHE_PROVIDER_GROUP, |
| 1252 | name, AP_SOCACHE_PROVIDER_VERSION); |
| 1253 | if (provider->socache_provider == NULL) { |
| 1254 | err = apr_psprintf(cmd->pool, |
| 1255 | "Unknown socache provider '%s'. Maybe you need " |
| 1256 | "to load the appropriate socache module " |
| 1257 | "(mod_socache_%s?)", name, name); |
| 1258 | } |
| 1259 | return err; |
| 1260 | } |
| 1261 | |
| 1262 | static const char *set_cache_max(cmd_parms *parms, void *in_struct_ptr, |
| 1263 | const char *arg) |
nothing calls this directly
no test coverage detected