Updated changelog to include some more details...
...on added features for the campaign server. Changed the campaign list request to call time just once so that the same time will be used for before and after (for relative to "now" requests) as is returned in the response.
This commit is contained in:
parent
85d8b38e44
commit
ba63d0f7f3
2 changed files with 9 additions and 5 deletions
|
@ -34,6 +34,10 @@ SVN trunk:
|
|||
* campaign server
|
||||
* Support new "timestamp" attribute
|
||||
* Save persistent attributes in the campaign data
|
||||
* Support filtering on campaign_list requests
|
||||
* filter by name
|
||||
* filter by last update time (before or after)
|
||||
* campaign_list response now contains the time the request was processed
|
||||
* utils: added weblist.pl and webtgz.pl web interface programs
|
||||
|
||||
Version 1.0rc1:
|
||||
|
|
|
@ -93,9 +93,11 @@ void campaign_server::run()
|
|||
config data;
|
||||
while((sock = network::receive_data(data)) != network::null_connection) {
|
||||
if(const config* req = data.child("request_campaign_list")) {
|
||||
time_t epoch = 0;
|
||||
if((const t_string)(*req)["times_relative_to"] == "now") {
|
||||
epoch = time(NULL);
|
||||
time_t epoch = time(NULL);
|
||||
config campaign_list;
|
||||
(campaign_list)["timestamp"] = lexical_cast<std::string>(epoch);
|
||||
if((const t_string)(*req)["times_relative_to"] != "now") {
|
||||
epoch = 0;
|
||||
}
|
||||
int before_flag = 0;
|
||||
time_t before = epoch;
|
||||
|
@ -117,8 +119,6 @@ void campaign_server::run()
|
|||
catch(bad_lexical_cast) {
|
||||
}
|
||||
}
|
||||
config campaign_list;
|
||||
(campaign_list)["timestamp"] = lexical_cast<std::string>(time(NULL));
|
||||
config::child_list cmps = campaigns().get_children("campaign");
|
||||
for(config::child_list::iterator i = cmps.begin(); i != cmps.end(); ++i) {
|
||||
if((const t_string)(*req)["name"] != "" && (*req)["name"] != (**i)["name"]) continue;
|
||||
|
|
Loading…
Add table
Reference in a new issue