#include <ostream>
#endif
-namespace AnyP {
+namespace AnyP
+{
/**
* List of all protocols known and supported.
std::auto_ptr<HttpReply> reply(err->BuildHttpReply());
replyBuf.reset(reply->pack());
errorStateFree(err);
- }
- else {
+ } else {
std::auto_ptr<HttpReply> reply(new HttpReply);
reply->setHeaders(HTTP_OK, NULL, "text/plain", -1, squid_curtime, squid_curtime);
reply->header.putStr(HDR_CONNECTION, "close"); // until we chunk response
if (param != NULL && param->type == QueryParam::ptInt) {
const std::vector<int>& processes = param->value();
for (Ipc::StrandCoords::const_iterator iter = aStrands.begin();
- iter != aStrands.end(); ++iter)
- {
+ iter != aStrands.end(); ++iter) {
if (std::find(processes.begin(), processes.end(), iter->kidId) != processes.end())
strands.push_back(*iter);
}
IntParam* param = dynamic_cast<IntParam*>(workersParam.getRaw());
if (param != NULL && param->type == QueryParam::ptInt) {
const std::vector<int>& workers = param->value();
- for (int i = 0; i < (int)aStrands.size(); ++i)
- {
+ for (int i = 0; i < (int)aStrands.size(); ++i) {
if (std::find(workers.begin(), workers.end(), i + 1) != workers.end())
strands.push_back(aStrands[i]);
}
Mgr::IntParam::IntParam():
- QueryParam(QueryParam::ptInt), array()
+ QueryParam(QueryParam::ptInt), array()
{
}
Mgr::IntParam::IntParam(const std::vector<int>& anArray):
- QueryParam(QueryParam::ptInt), array(anArray)
+ QueryParam(QueryParam::ptInt), array(anArray)
{
}
Mgr::QueryParam::Pointer
Mgr::QueryParams::CreateParam(QueryParam::Type aType)
{
- switch(aType) {
+ switch (aType) {
case QueryParam::ptInt:
return new IntParam();
Mgr::StringParam::StringParam():
- QueryParam(QueryParam::ptString), str()
+ QueryParam(QueryParam::ptString), str()
{
}
Mgr::StringParam::StringParam(const String& aString):
- QueryParam(QueryParam::ptString), str(aString)
+ QueryParam(QueryParam::ptString), str(aString)
{
}
req->pub_auth = xstrdup(q), decode_pub_auth(req);
else if (0 == strcasecmp(t, "operation"))
req->action = xstrdup(q);
- else if(0 == strcasecmp(t, "workers") && strlen(q))
+ else if (0 == strcasecmp(t, "workers") && strlen(q))
req->workers = xstrdup(q);
- else if(0 == strcasecmp(t, "processes") && strlen(q))
+ else if (0 == strcasecmp(t, "processes") && strlen(q))
req->processes = xstrdup(q);
}