Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 3rd, 2012  |  syntax: C  |  size: 0.54 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. if (stat("./etc/bandwidthd.conf", &StatBuf))
  2.                 {
  3.                 chdir(INSTALL_DIR);
  4.                 if (stat("./etc/bandwidthd.conf", &StatBuf))
  5.                         {
  6.                         printf("Cannot find ./etc/bandwidthd.conf or %s/etc/bandwidthd.conf\n", INSTALL_DIR);
  7.                         syslog(LOG_ERR, "Cannot find ./etc/bandwidthd.conf or %s/etc/bandwidthd.conf", INSTALL_DIR);
  8.                         exit(1);
  9.                         }
  10.                 }
  11.  
  12.         bdconfig_in = fopen("./etc/bandwidthd.conf", "rt");
  13.         if (!bdconfig_in)
  14.                 {
  15.                 syslog(LOG_ERR, "Cannot open bandwidthd.conf");
  16.                 printf("Cannot open ./etc/bandwidthd.conf\n");
  17.                 exit(1);
  18.                 }
  19.         bdconfig_parse();