# HG changeset patch # User Sebastien Jodogne # Date 1395257366 -3600 # Node ID 1cd3ec5440398af44b18daadaf24c45f633b232a # Parent 913179bc7cc5917c9a1e00fd2b4ca6f01dbafc17 fix diff -r 913179bc7cc5 -r 1cd3ec544039 OrthancServer/DatabaseWrapper.cpp --- a/OrthancServer/DatabaseWrapper.cpp Wed Mar 19 10:50:53 2014 +0100 +++ b/OrthancServer/DatabaseWrapper.cpp Wed Mar 19 20:29:26 2014 +0100 @@ -616,9 +616,9 @@ while (changes.size() < maxResults && s.Step()) { - int64_t seq = s.ColumnInt(0); + int64_t seq = s.ColumnInt64(0); ChangeType changeType = static_cast(s.ColumnInt(1)); - int64_t internalId = s.ColumnInt(2); + int64_t internalId = s.ColumnInt64(2); ResourceType resourceType = static_cast(s.ColumnInt(3)); const std::string& date = s.ColumnString(4); std::string publicId = GetPublicId(internalId); @@ -684,10 +684,10 @@ } - void DatabaseWrapper::GetExportedResources(Json::Value& target, - SQLite::Statement& s, - int64_t since, - unsigned int maxResults) + void DatabaseWrapper::GetExportedResourcesInternal(Json::Value& target, + SQLite::Statement& s, + int64_t since, + unsigned int maxResults) { Json::Value changes = Json::arrayValue; int64_t last = since; @@ -746,7 +746,7 @@ "SELECT * FROM ExportedResources WHERE seq>? ORDER BY seq LIMIT ?"); s.BindInt64(0, since); s.BindInt(1, maxResults + 1); - GetExportedResources(target, s, since, maxResults); + GetExportedResourcesInternal(target, s, since, maxResults); } @@ -754,7 +754,7 @@ { SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT * FROM ExportedResources ORDER BY seq DESC LIMIT 1"); - GetExportedResources(target, s, 0, 1); + GetExportedResourcesInternal(target, s, 0, 1); } diff -r 913179bc7cc5 -r 1cd3ec544039 OrthancServer/DatabaseWrapper.h --- a/OrthancServer/DatabaseWrapper.h Wed Mar 19 10:50:53 2014 +0100 +++ b/OrthancServer/DatabaseWrapper.h Wed Mar 19 20:29:26 2014 +0100 @@ -67,10 +67,10 @@ int64_t since, unsigned int maxResults); - void GetExportedResources(Json::Value& target, - SQLite::Statement& s, - int64_t since, - unsigned int maxResults); + void GetExportedResourcesInternal(Json::Value& target, + SQLite::Statement& s, + int64_t since, + unsigned int maxResults); public: void SetGlobalProperty(GlobalProperty property,