正在显示
7 个修改的文件
包含
18 行增加
和
12 行删除
... | ... | @@ -5,8 +5,8 @@ SET(CMAKE_BUILD_TYPE Debug CACHE STRING "Build type" FORCE) |
5 | 5 | |
6 | 6 | ############################################################# |
7 | 7 | # Project and version |
8 | -SET(CPACK_PACKAGE_VERSION_MAJOR "3") | |
9 | -SET(CPACK_PACKAGE_VERSION_MINOR "0") | |
8 | +SET(CPACK_PACKAGE_VERSION_MAJOR "4") | |
9 | +SET(CPACK_PACKAGE_VERSION_MINOR "1") | |
10 | 10 | SET(CPACK_PACKAGE_VERSION_PATCH "0") |
11 | 11 | SET(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}) |
12 | 12 | SET(RELEASE_NAME "Master") | ... | ... |
... | ... | @@ -41,6 +41,7 @@ class DebugFilter(DmpServerFilter): |
41 | 41 | headers_dict = handler.request_headers() |
42 | 42 | handler.clear() |
43 | 43 | handler.set_response_header('Status', '200 Ok') |
44 | + # handler.set_response_header("Content-Type", "text/html;charset=utf-8"); | |
44 | 45 | handler.append_body(b'<h1>Params</h1>') |
45 | 46 | for param in params: |
46 | 47 | handler.append_body(('<p><b>%s</b> "%s"</p>' % (param.key(), param.data())).encode('utf8')) | ... | ... |
... | ... | @@ -43,7 +43,7 @@ void DmpFilterResponseDecorator::start() |
43 | 43 | DmpServerFiltersMap::const_iterator filtersIterator; |
44 | 44 | for (filtersIterator = filters_.begin(); filtersIterator != filters_.end(); ++filtersIterator) |
45 | 45 | { |
46 | - filtersIterator->second->RequestReady(); | |
46 | + filtersIterator->second->requestReady(); | |
47 | 47 | } |
48 | 48 | #endif |
49 | 49 | } |
... | ... | @@ -54,7 +54,7 @@ void DmpFilterResponseDecorator::flush() |
54 | 54 | DmpServerFiltersMap::const_iterator filtersIterator; |
55 | 55 | for (filtersIterator = filters_.begin(); filtersIterator != filters_.end(); ++filtersIterator) |
56 | 56 | { |
57 | - filtersIterator->second->SendResponse(); | |
57 | + filtersIterator->second->sendResponse(); | |
58 | 58 | } |
59 | 59 | #endif |
60 | 60 | response_.flush(); |
... | ... | @@ -66,7 +66,7 @@ void DmpFilterResponseDecorator::finish() |
66 | 66 | DmpServerFiltersMap::const_iterator filtersIterator; |
67 | 67 | for (filtersIterator = filters_.begin(); filtersIterator != filters_.end(); ++filtersIterator) |
68 | 68 | { |
69 | - filtersIterator->second->ResponseComplete(); | |
69 | + filtersIterator->second->responseComplete(); | |
70 | 70 | } |
71 | 71 | #endif |
72 | 72 | response_.finish(); | ... | ... |
... | ... | @@ -17,6 +17,7 @@ |
17 | 17 | #include "dmpfilterresponsedecorator.h" |
18 | 18 | #include "dmpservercontext.h" |
19 | 19 | #include "dmpserverapicontext.h" |
20 | +#include "dmpserverplugins.h" | |
20 | 21 | |
21 | 22 | using namespace std; |
22 | 23 | |
... | ... | @@ -128,7 +129,7 @@ void DmpMainServer::HandleRequest(DmpServerRequest &request, DmpServerResponse & |
128 | 129 | void DmpMainServer::InitPython() |
129 | 130 | { |
130 | 131 | // Init plugins |
131 | - if (!DmpServerPlugins::InitPlugins(server_interface_)) | |
132 | + if (!DmpServerPlugins::InitPlugins(serverInterface_)) | |
132 | 133 | { |
133 | 134 | LOGGER_WARN("No server python plugins are available"); |
134 | 135 | } | ... | ... |
... | ... | @@ -16,7 +16,8 @@ |
16 | 16 | #include <boost/property_tree/xml_parser.hpp> |
17 | 17 | #include <sstream> |
18 | 18 | #include <fstream> |
19 | - | |
19 | +#include <iostream> | |
20 | +#include "dmplogger.h" | |
20 | 21 | |
21 | 22 | |
22 | 23 | DmpServerManager::DmpServerManager() |
... | ... | @@ -49,8 +50,11 @@ void DmpServerManager::init(const boost::filesystem::path &modulePath) |
49 | 50 | { |
50 | 51 | serverRegistry_->init(modulePath); |
51 | 52 | |
52 | - LoadServices(); | |
53 | - //LoadDmpServices(); | |
53 | + if(!LoadServices()) | |
54 | + { | |
55 | + std::cout << "加载服务失败!" << std::endl; | |
56 | + LOGGER_ERROR("加载服务失败!"); | |
57 | + } | |
54 | 58 | } |
55 | 59 | |
56 | 60 | std::string DmpServerManager::getCapabilities() | ... | ... |
... | ... | @@ -20,6 +20,7 @@ |
20 | 20 | #include <map> |
21 | 21 | #include <string> |
22 | 22 | #include "dmpserver.h" |
23 | +#include "dmpconfig.h" | |
23 | 24 | |
24 | 25 | using namespace std; |
25 | 26 | |
... | ... | @@ -159,7 +160,7 @@ std::string DmpServerRegistry::getCapabilities() |
159 | 160 | boost::property_tree::ptree root; |
160 | 161 | boost::property_tree::ptree ptServers; |
161 | 162 | root.put("product", "DMap Server"); |
162 | - root.put("version", "4.0"); | |
163 | + root.put("version", VERSION); | |
163 | 164 | |
164 | 165 | for (const auto &server : servers_) { |
165 | 166 | std::shared_ptr<DmpServer> pserver = server.second; | ... | ... |
请
注册
或
登录
后发表评论