summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2005-06-11 14:49:35 (UTC)
committer Michael Krelin <hacker@klever.net>2005-06-11 14:49:35 (UTC)
commit621221c40a42683a185b15b99c03fd6c8b6f7d90 (patch) (unidiff)
tree061f1e7a9fb7b16122eed9715c1a180629dbd953
parent01e3789f5b7c3b2c0282b70eb203d11c76d3c8f3 (diff)
downloadsitecing-621221c40a42683a185b15b99c03fd6c8b6f7d90.zip
sitecing-621221c40a42683a185b15b99c03fd6c8b6f7d90.tar.gz
sitecing-621221c40a42683a185b15b99c03fd6c8b6f7d90.tar.bz2
1. added missing include
2. fixed typo in Makefile 3. fixed zero-size output segfault
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--include/sitecing/acomponent.h1
-rw-r--r--lib/sitecing_interface_cgi.cc4
-rw-r--r--src/Makefile.am2
3 files changed, 5 insertions, 2 deletions
diff --git a/include/sitecing/acomponent.h b/include/sitecing/acomponent.h
index 160e854..461f8a6 100644
--- a/include/sitecing/acomponent.h
+++ b/include/sitecing/acomponent.h
@@ -1,7 +1,8 @@
1#ifndef __SITECING_ACOMPONENT_H 1#ifndef __SITECING_ACOMPONENT_H
2#define __SITECING_ACOMPONENT_H 2#define __SITECING_ACOMPONENT_H
3 3
4#include <cstdarg>
4#include "sitecing/sitecing_interface.h" 5#include "sitecing/sitecing_interface.h"
5 6
6/** 7/**
7 * @file 8 * @file
diff --git a/lib/sitecing_interface_cgi.cc b/lib/sitecing_interface_cgi.cc
index 59ae25a..1acb23c 100644
--- a/lib/sitecing_interface_cgi.cc
+++ b/lib/sitecing_interface_cgi.cc
@@ -20,9 +20,11 @@ namespace sitecing {
20 assert(cgigw); 20 assert(cgigw);
21 flush_headers(); 21 flush_headers();
22 if(is_buffering()) { 22 if(is_buffering()) {
23 streampos count = prebuffer.pubseekoff(0,ios_base::cur,ios_base::out); 23 streampos count = prebuffer.pubseekoff(0,ios_base::cur,ios_base::out);
24 cgigw->out().write(prebuffer.str().c_str(),count); 24 if(count>0) {
25 cgigw->out().write(prebuffer.str().c_str(),count);
26 }
25 prebuffer.str(""); 27 prebuffer.str("");
26 } 28 }
27 cgigw->out().flush(); 29 cgigw->out().flush();
28 set_buffering(keep_buffering); 30 set_buffering(keep_buffering);
diff --git a/src/Makefile.am b/src/Makefile.am
index 2ec650d..e6fb31a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -33,5 +33,5 @@ COPYING.cc: ${top_srcdir}/COPYING
33 echo "const char * COPYING =" >$@ || (rm $@;exit 1) 33 echo "const char * COPYING =" >$@ || (rm $@;exit 1)
34 sed 's/"/\\"/g' $< | sed 's/^/\"/' | sed 's/$$/\\n\"/' >>$@ || (rm $@;exit 1) 34 sed 's/"/\\"/g' $< | sed 's/^/\"/' | sed 's/$$/\\n\"/' >>$@ || (rm $@;exit 1)
35 echo ";" >>$@ || (rm $@;exit 1) 35 echo ";" >>$@ || (rm $@;exit 1)
36 36
37EXTRA_DIST = ${sitecing_fastcgi_SOURCES} ${sitecing_PLAINCGI_SOURCES} 37EXTRA_DIST = ${sitecing_fastcgi_SOURCES} ${sitecing_plaincgi_SOURCES}