From 34556253048b096eef1c0778c38f92ed6f9c0db8 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 18 Feb 2009 11:15:53 +0000 Subject: Changed string to time conversion to atol, added missing include. --- server/src/queryhandlerpracro.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/src') diff --git a/server/src/queryhandlerpracro.cc b/server/src/queryhandlerpracro.cc index 8219461..3dd5b52 100644 --- a/server/src/queryhandlerpracro.cc +++ b/server/src/queryhandlerpracro.cc @@ -28,6 +28,8 @@ #include "debug.h" +#include + QueryHandlerPracro::QueryHandlerPracro(Database *db, std::string cpr) { this->cpr = cpr; @@ -43,7 +45,7 @@ QueryResult QueryHandlerPracro::exec(Query &query) fields.push_back(field); std::string ttl = query.attributes["ttl"]; - time_t oldest = time(NULL) - atoi(ttl.c_str()); + time_t oldest = time(NULL) - atol(ttl.c_str()); Values values = db->getValues(cpr, fields, oldest); -- cgit v1.2.3