You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Greg Miell <gr...@dsl.pipex.com> on 2004/05/26 22:15:03 UTC
[users@httpd] C++ retrieving settings...
I am writing a module and need to retrieve two settings from my httpd.conf
or the .htaccess files.
How is this possible?
These two are declared in mod_dav_fs.c:
static const char *dav_fs_cmd_davquotamax(cmd_parms *cmd, void *config,
const char *arg1)
{
dav_fs_server_conf *conf;
conf = ap_get_module_config(cmd->server->module_config,
&dav_fs_module);
conf->quotamax = atoi(arg1);
if (conf->quotamax < 0)
return "DAVQuotaMax requires a non-negative integer.";
return NULL;
}
static const char *dav_fs_cmd_davquotaroot(cmd_parms *cmd, void *config,
const char *arg1)
{
dav_fs_server_conf *conf;
conf = ap_get_module_config(cmd->server->module_config,
&dav_fs_module);
conf->quotapath = ap_server_root_relative(cmd->pool, arg1);
if (!conf->quotapath) {
return apr_pstrcat(cmd->pool, "Invalid DAVLockDB path ",
arg1, NULL);
}
conf->quotapath = arg1;
if (conf->quotamax <= 0)
return "DAVQuotaRoot requires DAVQuotaMax.";
return NULL;
}
How can I gain the values of tbe constants in another c file in the same
project/module. I am quite new to c++ and am learning while im sorting out
my modules..
Thanks
Greg Miell
+447763909283
http://www.greg-net.dnsalias.net
telnet://bbs.greg-net.dnsalias.net
Dell Dimension 2350
2.5GHz Intel Pentium 4
1GB SDRAM
Intel Graphics -> Dell 17in CRT
Matrox Mystique Graphics -> Compaq 15in CRT
1xDVD-ROM
1xCR-RW
1x120GB HDD
1x200GB HDD
6xUSB
1xNIC -> ADSL Router
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org