diff options
author | Pixel <pixel@nobis-crew.org> | 2012-04-01 07:18:00 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2012-04-01 07:18:00 -0700 |
commit | 1fdf750ee66ee9e4e872d2810e9ca3bcfa2d555e (patch) | |
tree | 2d7b8ddbae76d1924fec41bc74f7ebeb730ac6ff /src | |
parent | 8dfe080bf03fde34415f3edfbb0426260eeaeaec (diff) |
More code cleanup.
Diffstat (limited to 'src')
-rw-r--r-- | src/HttpServer.cc | 4 | ||||
-rw-r--r-- | src/Main.cc | 2 | ||||
-rw-r--r-- | src/Socket.cc | 2 | ||||
-rw-r--r-- | src/Task.cc | 4 | ||||
-rw-r--r-- | src/TaskMan.cc | 8 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/HttpServer.cc b/src/HttpServer.cc index c234096..c9cb0ee 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -39,7 +39,7 @@ class HttpWorker : public Task { static void buildErrorTemplate(const String & str) { m_errorTemplate.setTemplate(str); } private: virtual void Do(); - virtual const char * getName(); + virtual const char * getName() const; bool handleClient(); void sendError(int error, const char * msg, const char * details, bool closeConnection, std::vector<String> extraHeaders, std::vector<String> trace); @@ -586,7 +586,7 @@ void Balau::HttpWorker::Do() { clientStop = !handleClient() || m_socket->isClosed(); } -const char * Balau::HttpWorker::getName() { +const char * Balau::HttpWorker::getName() const { return m_name.to_charp(); } diff --git a/src/Main.cc b/src/Main.cc index b2aa739..fd4021f 100644 --- a/src/Main.cc +++ b/src/Main.cc @@ -43,7 +43,7 @@ Balau::MainTask::~MainTask() { TaskMan::stop(0); } -const char * Balau::MainTask::getName() { +const char * Balau::MainTask::getName() const { return "Main Task"; } diff --git a/src/Socket.cc b/src/Socket.cc index 3bcf840..1c3778a 100644 --- a/src/Socket.cc +++ b/src/Socket.cc @@ -590,7 +590,7 @@ Balau::ListenerBase::ListenerBase(int port, const char * local, void * opaque) : Printer::elog(E_SOCKET, "Created a listener task at %p (%s)", this, m_name.to_charp()); } -const char * Balau::ListenerBase::getName() { +const char * Balau::ListenerBase::getName() const { return m_name.to_charp(); } diff --git a/src/Task.cc b/src/Task.cc index 0938ff3..6278fd5 100644 --- a/src/Task.cc +++ b/src/Task.cc @@ -161,10 +161,10 @@ void Balau::Events::TaskEvent::signal() { } void Balau::Events::TaskEvent::gotOwner(Task * task) { - TaskMan * tm = task->getMyTaskMan(); + TaskMan * tm = task->getTaskMan(); m_evt.stop(); - if (tm != m_taskWaited->getMyTaskMan()) { + if (tm != m_taskWaited->getTaskMan()) { m_evt.set(tm->getLoop()); m_evt.set<TaskEvent, &TaskEvent::evt_cb>(this); m_evt.start(); diff --git a/src/TaskMan.cc b/src/TaskMan.cc index b909caa..8fd6df5 100644 --- a/src/TaskMan.cc +++ b/src/TaskMan.cc @@ -8,15 +8,15 @@ class Stopper : public Balau::Task { Stopper(int code) : m_code(code) { } private: virtual void Do(); - virtual const char * getName(); + virtual const char * getName() const; int m_code; }; void Stopper::Do() { - getMyTaskMan()->stopMe(m_code); + getTaskMan()->stopMe(m_code); } -const char * Stopper::getName() { +const char * Stopper::getName() const { return "Stopper"; } @@ -321,7 +321,7 @@ int Balau::TaskMan::mainLoop() { void Balau::TaskMan::registerTask(Balau::Task * t, Balau::Task * stick) { if (stick) { - TaskMan * tm = stick->getMyTaskMan(); + TaskMan * tm = stick->getTaskMan(); tm->addToPending(t); tm->m_evt.send(); } else { |