| 1845 | } |
| 1846 | |
| 1847 | AP_DECLARE(const char *) ap_process_resource_config(server_rec *s, |
| 1848 | const char *fname, |
| 1849 | ap_directive_t **conftree, |
| 1850 | apr_pool_t *p, |
| 1851 | apr_pool_t *ptemp) |
| 1852 | { |
| 1853 | ap_configfile_t *cfp; |
| 1854 | cmd_parms parms; |
| 1855 | apr_status_t rv; |
| 1856 | const char *error; |
| 1857 | |
| 1858 | parms = default_parms; |
| 1859 | parms.pool = p; |
| 1860 | parms.temp_pool = ptemp; |
| 1861 | parms.server = s; |
| 1862 | parms.override = (RSRC_CONF | OR_ALL) & ~(OR_AUTHCFG | OR_LIMIT); |
| 1863 | parms.override_opts = OPT_ALL | OPT_SYM_OWNER | OPT_MULTI; |
| 1864 | |
| 1865 | rv = ap_pcfg_openfile(&cfp, p, fname); |
| 1866 | if (rv != APR_SUCCESS) { |
| 1867 | return apr_psprintf(p, "Could not open configuration file %s: %pm", |
| 1868 | fname, &rv); |
| 1869 | } |
| 1870 | |
| 1871 | if (ap_exists_config_define("DUMP_INCLUDES")) { |
| 1872 | dump_config_name(fname, p); |
| 1873 | } |
| 1874 | |
| 1875 | parms.config_file = cfp; |
| 1876 | error = ap_build_config(&parms, p, ptemp, conftree); |
| 1877 | ap_cfg_closefile(cfp); |
| 1878 | |
| 1879 | if (error) { |
| 1880 | if (parms.err_directive) |
| 1881 | return apr_psprintf(p, "Syntax error on line %d of %s: %s", |
| 1882 | parms.err_directive->line_num, |
| 1883 | parms.err_directive->filename, error); |
| 1884 | else |
| 1885 | return error; |
| 1886 | } |
| 1887 | |
| 1888 | return NULL; |
| 1889 | } |
| 1890 | |
| 1891 | typedef struct { |
| 1892 | server_rec *s; |
no test coverage detected