
Untitled
By: a guest on
Aug 3rd, 2012 | syntax:
C | size: 0.54 KB | hits: 17 | expires: Never
if (stat("./etc/bandwidthd.conf", &StatBuf))
{
chdir(INSTALL_DIR);
if (stat("./etc/bandwidthd.conf", &StatBuf))
{
printf("Cannot find ./etc/bandwidthd.conf or %s/etc/bandwidthd.conf\n", INSTALL_DIR);
syslog(LOG_ERR, "Cannot find ./etc/bandwidthd.conf or %s/etc/bandwidthd.conf", INSTALL_DIR);
exit(1);
}
}
bdconfig_in = fopen("./etc/bandwidthd.conf", "rt");
if (!bdconfig_in)
{
syslog(LOG_ERR, "Cannot open bandwidthd.conf");
printf("Cannot open ./etc/bandwidthd.conf\n");
exit(1);
}
bdconfig_parse();