summaryrefslogtreecommitdiff
path: root/server/src/queryhandlerpentominos.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/queryhandlerpentominos.cc')
-rw-r--r--server/src/queryhandlerpentominos.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/server/src/queryhandlerpentominos.cc b/server/src/queryhandlerpentominos.cc
index 62a742f..4abf5da 100644
--- a/server/src/queryhandlerpentominos.cc
+++ b/server/src/queryhandlerpentominos.cc
@@ -135,8 +135,8 @@ static std::string getUID(const char *interface)
}
-QueryHandlerPentominos::QueryHandlerPentominos(TCPSocket &_socket, std::string cpr)
- : QueryHandler(), socket(_socket)
+QueryHandlerPentominos::QueryHandlerPentominos(Artefact &atf, std::string cpr)
+ : QueryHandler(), artefact(atf)
{
this->cpr = cpr;
}
@@ -154,7 +154,7 @@ QueryResult QueryHandlerPentominos::exec(Query &query)
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
" xsi:schemaLocation=\"http://www.aasimon.org/pentominos schema.xsd\">\n";
#ifndef WITHOUT_PENTOMINOS
- socket.write(header, strlen(header));
+ artefact.socket.write(header, strlen(header));
#endif/*WITHOUT_PENTOMINOS*/
PRACRO_DEBUG(queryhandler, "%s", header);
@@ -169,8 +169,8 @@ QueryResult QueryHandlerPentominos::exec(Query &query)
cpr.c_str(),
"pracro",
#ifndef WITHOUT_PENTOMINOS
- socket.srcaddr().c_str(),
- socket.dstaddr().c_str(),
+ artefact.socket.srcaddr().c_str(),
+ artefact.socket.dstaddr().c_str(),
#else
"127.0.0.1",
"127.0.0.1",
@@ -178,7 +178,7 @@ QueryResult QueryHandlerPentominos::exec(Query &query)
(unsigned int)timestamp,
uid.c_str());
#ifndef WITHOUT_PENTOMINOS
- socket.write(buf, strlen(buf));
+ artefact.socket.write(buf, strlen(buf));
#endif/*WITHOUT_PENTOMINOS*/
PRACRO_DEBUG(queryhandler, "%s", buf);
@@ -191,7 +191,7 @@ QueryResult QueryHandlerPentominos::exec(Query &query)
query.attributes["class"].c_str());
#ifndef WITHOUT_PENTOMINOS
- socket.write(buf, strlen(buf));
+ artefact.socket.write(buf, strlen(buf));
#endif/*WITHOUT_PENTOMINOS*/
PRACRO_DEBUG(queryhandler, "%s", buf);
@@ -199,7 +199,7 @@ QueryResult QueryHandlerPentominos::exec(Query &query)
sprintf(buf, "</artefact>");
#ifndef WITHOUT_PENTOMINOS
- socket.write(buf, strlen(buf));
+ artefact.socket.write(buf, strlen(buf));
#endif/*WITHOUT_PENTOMINOS*/
PRACRO_DEBUG(queryhandler, "%s", buf);
@@ -212,7 +212,7 @@ QueryResult QueryHandlerPentominos::exec(Query &query)
ssize_t size;
// Read until we've got the entire result.
- while((size = socket.read(buf, sizeof(buf))) > 0) {
+ while((size = artefact.socket.read(buf, sizeof(buf))) > 0) {
// fwrite(buf, size, 1, stdout); fflush(stdout);
if(parser.parse(buf, size)) break;
}