Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
http: formatting for travis
  • Loading branch information
linev committed Apr 18, 2017
commit 993a4aabf380a6d70fbcfc2f485105eae63decd1
1 change: 0 additions & 1 deletion net/http/src/THttpCallArg.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ Bool_t THttpCallArg::CompressWithGzip()
return kTRUE;
}


////////////////////////////////////////////////////////////////////////////////
/// method used to notify condition which waiting when operation will complete
/// Condition notified only if not-postponed state is set
Expand Down
1 change: 0 additions & 1 deletion net/http/src/THttpEngine.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ void THttpWSEngine::SendCharStar(const char *str)
if (str) Send(str, strlen(str));
}


////////////////////////////////////////////////////////////////////////////////
/// react on canvas modifications

Expand Down
32 changes: 14 additions & 18 deletions net/http/src/THttpServer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,29 +67,29 @@ class THttpTimer : public TTimer {

//////////////////////////////////////////////////////////////////////////////////////////////////


class TLongPollEngine : public THttpWSEngine {
protected:
THttpCallArg *fPoll; ///< polling request, which can be used for the next sending
TString fBuf; ///< single entry to keep data which is not yet send to the client
THttpCallArg *fPoll; ///< polling request, which can be used for the next sending
TString fBuf; ///< single entry to keep data which is not yet send to the client

public:
TLongPollEngine(const char *name, const char *title)
: THttpWSEngine(name, title), fPoll(0), fBuf()
{
}
TLongPollEngine(const char *name, const char *title) : THttpWSEngine(name, title), fPoll(0), fBuf() {}

virtual ~TLongPollEngine() {}

virtual UInt_t GetId() const
{
const void *ptr = (const void *) this;
return TString::Hash((void *) &ptr, sizeof(void *));
const void *ptr = (const void *)this;
return TString::Hash((void *)&ptr, sizeof(void *));
}

virtual void ClearHandle()
{
if (fPoll) { fPoll->Set404(); fPoll->NotifyCondition(); fPoll = 0; }
if (fPoll) {
fPoll->Set404();
fPoll->NotifyCondition();
fPoll = 0;
}
}

virtual void Send(const void * /*buf*/, int /*len*/)
Expand All @@ -104,8 +104,7 @@ class TLongPollEngine : public THttpWSEngine {
fPoll->SetContent(buf);
fPoll->NotifyCondition();
fPoll = 0;
} else
if (fBuf.Length() == 0) {
} else if (fBuf.Length() == 0) {
fBuf = buf;
} else {
Error("TLongPollEngine::SendCharStar", "Too many send operations, use TList object instead");
Expand Down Expand Up @@ -137,10 +136,8 @@ class TLongPollEngine : public THttpWSEngine {
// if arguments has "&dummy" string, user should not process it
return strstr(arg->GetQuery(), "&dummy") != 0;
}

};


// =======================================================

//////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -772,18 +769,17 @@ void THttpServer::ProcessRequest(THttpCallArg *arg)
if (canv->GetCanvasImp()->ProcessWSRequest(arg)) {
arg->SetMethod("WS_READY");

TLongPollEngine* handle = new TLongPollEngine("longpoll", arg->fPathName.Data());
TLongPollEngine *handle = new TLongPollEngine("longpoll", arg->fPathName.Data());

arg->SetWSId(handle->GetId());
arg->SetWSHandle(handle);

if (canv->GetCanvasImp()->ProcessWSRequest(arg)) {
arg->SetContent(TString::Format("%u",arg->GetWSId()));
arg->SetContent(TString::Format("%u", arg->GetWSId()));
arg->SetContentType("text/plain");
}
}
if (!arg->IsContentType("text/plain"))
arg->Set404();
if (!arg->IsContentType("text/plain")) arg->Set404();
} else {
TUrl url;
url.SetOptions(arg->fQuery);
Expand Down