~ubuntu-branches/ubuntu/raring/dansguardian/raring

« back to all changes in this revision

Viewing changes to src/HTMLTemplate.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Wirt, Thomas Viehmann
  • Date: 2008-10-13 09:29:35 UTC
  • mfrom: (1.1.7 upstream) (7.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20081013092935-g8uz3kgfjs37ikgv
Tags: 2.9.9.7-2
[ Thomas Viehmann ]
OptionContainer.cpp: If you need to iterate through all lines in the
config file to find a field, at least don't abuse the configfile deque
by accessing it as if it was an array with signed index.
Works way better on arm, too, i.e. closes: #493047.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
// INCLUDES
24
24
 
25
 
#include "platform.h"
26
 
 
 
25
#ifdef HAVE_CONFIG_H
 
26
        #include "dgconfig.h"
 
27
#endif
27
28
#include "HTMLTemplate.hpp"
28
29
#include "RegExp.hpp"
29
30
#include "String.hpp"
71
72
        unsigned int offset;
72
73
        String result;
73
74
        String line;
74
 
        std::ifstream templatefile(filename, ios::in);  // dansguardian.conf
 
75
        std::ifstream templatefile(filename, std::ios::in);  // dansguardian.conf
75
76
        if (!templatefile.good()) {
76
77
                if (!is_daemonised) {
77
78
                        std::cerr << "error reading: " << filename << std::endl;