Browse Source

778 had to add %><% before and after if statments

mcoccia 11 years ago
parent
commit
e024401c7a
3 changed files with 16 additions and 15 deletions
  1. 6 5
      cpoll_cppsp/www/db
  2. 5 5
      cpoll_cppsp/www/db_pg_async
  3. 5 5
      cpoll_cppsp/www/db_pg_threadpool

+ 6 - 5
cpoll_cppsp/www/db

@@ -128,17 +128,18 @@ void efdCB(eventfd_t efdVal) {
 void waitCB(eventfd_t efdVal) {
 	this->doInit();
 }
-if(queries>1) {
+%><%
+if (queries>1) {
 	%>[<%
 }
 for (int i=0;i<queries;i++){
 	if(i>0) output.write(',');
 	%>{"id":<%=items[i].id%>,"randomNumber":<%=items[i].rnd%>}<%
 }
-
-response->headers["Content-Type"]="application/json";
-response->headers["Server"]="cppsp/0.2";
-if(queries>1) {
+if (queries>1) {
 	%>]<%
 }
+%><%
+response->headers["Content-Type"]="application/json";
+response->headers["Server"]="cppsp/0.2";
 %>

+ 5 - 5
cpoll_cppsp/www/db_pg_async

@@ -107,7 +107,7 @@ void evtIn(int) {
 	PQclear(res);
 	beginGetItems();
 }
-
+%><%
 if(queries>1) {
 	%>[<%
 }
@@ -115,10 +115,10 @@ for (int i=0;i<queries;i++){
 	if(i>0) output.write(',');
 	%>{"id":<%=items[i].id%>,"randomNumber":<%=items[i].rnd%>}<%
 }
-
-response->headers["Content-Type"]="application/json";
-response->headers["Server"]="cppsp/0.2";
 if(queries>1) {
-	%>]<%
+        %>]<%
 }
+%><%
+response->headers["Content-Type"]="application/json";
+response->headers["Server"]="cppsp/0.2";
 %>

+ 5 - 5
cpoll_cppsp/www/db_pg_threadpool

@@ -94,7 +94,7 @@ void efdCB(eventfd_t efdVal) {
 void waitCB(eventfd_t efdVal) {
 	this->doInit();
 }
-
+%><%
 if(queries>1) {
 	%>[<%
 }
@@ -102,10 +102,10 @@ for (int i=0;i<queries;i++){
 	if(i>0) output.write(',');
 	%>{"id":<%=items[i].id%>,"randomNumber":<%=items[i].rnd%>}<%
 }
-
-response->headers["Content-Type"]="application/json";
-response->headers["Server"]="cppsp/0.2";
 if(queries>1) {
-	%>]<%
+        %>]<%
 }
+%><%
+response->headers["Content-Type"]="application/json";
+response->headers["Server"]="cppsp/0.2";
 %>