summaryrefslogtreecommitdiff
path: root/server/src/templateheaderparser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/templateheaderparser.cc')
-rw-r--r--server/src/templateheaderparser.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/server/src/templateheaderparser.cc b/server/src/templateheaderparser.cc
index b2c68e3..3c327fd 100644
--- a/server/src/templateheaderparser.cc
+++ b/server/src/templateheaderparser.cc
@@ -110,8 +110,9 @@ void TemplateHeaderParser::startTag(std::string name, attributes_t &attr)
int TemplateHeaderParser::readData(char *data, size_t size)
{
- if(t) return 0; // If t is allocated, it means that we have parsed the template
- // tag, and can dismiss the rest of the document.
+ // If t is allocated, it means that we have parsed the template
+ // tag, and can dismiss the rest of the document.
+ if(t) return 0;
if(fd == -1) {
ERR_LOG(templateparser, "Invalid file descriptor.\n");
@@ -125,12 +126,15 @@ int TemplateHeaderParser::readData(char *data, size_t size)
return r;
}
-void TemplateHeaderParser::parseError(const char *buf, size_t len, std::string error, int lineno)
+void TemplateHeaderParser::parseError(const char *buf, size_t len,
+ std::string error, int lineno)
{
- if(t) return; // Ignore "unclosed token" errors when the template tag has been parsed.
+ // Ignore "unclosed token" errors when the template tag has been parsed.
+ if(t) return;
- ERR_LOG(templateparser, "TemplateHeaderParser[%s] error at line %d: %s\n", file.c_str(), lineno, error.c_str());
- ERR_LOG(templateparser, "\tBuffer %u bytes: [", len);
+ ERR_LOG(templateparser, "TemplateHeaderParser[%s] error at line %d: %s\n",
+ file.c_str(), lineno, error.c_str());
+ ERR_LOG(templateparser, "\tBuffer %u bytes: [", (int)len);
if(fwrite(buf, len, 1, stderr) != len) {}
ERR_LOG(templateparser, "]\n");