Skip to content

Commit

Permalink
campaignd: Reject bad requests with an [error] block
Browse files Browse the repository at this point in the history
This can be used to signal campaignd clients in the future about
features that aren't yet implemented.

As with the previous change to using find() to locate a request handler,
this only applies to the first WML child of the request's root node.
Other nodes continue to be ignored.
  • Loading branch information
irydacea committed Jun 25, 2014
1 parent df54918 commit efcf8f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/campaign_server/campaign_server.cpp
Expand Up @@ -290,6 +290,9 @@ void server::run()
if(j != handlers_.end()) {
// Call the handler.
j->second(request(c.key, c.cfg, sock));
} else {
send_error("Unrecognized [" + c.key + "] request.",
sock);
}
}
}
Expand Down

0 comments on commit efcf8f7

Please sign in to comment.