summaryrefslogtreecommitdiff
path: root/src/operator-idle.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/operator-idle.cc')
-rw-r--r--src/operator-idle.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/operator-idle.cc b/src/operator-idle.cc
index 7c5ce40..3ce9673 100644
--- a/src/operator-idle.cc
+++ b/src/operator-idle.cc
@@ -57,7 +57,7 @@ const std::string IdleOperator::getName() const
return "IDLE";
}
-int IdleOperator::getState() const
+Session::State IdleOperator::getState() const
{
return Session::SELECTED;
}
@@ -120,7 +120,7 @@ Operator::ProcessResult IdleOperator::process(Depot &depot, Request &command)
session.setState(Session::LOGOUT);
close(newfd);
close(curfd);
- return NOTHING;
+ return Operator::ProcessResult::NOTHING;
} else
#endif
if (time(nullptr) > startTime + IDLE_TIMEOUT)
@@ -128,7 +128,7 @@ Operator::ProcessResult IdleOperator::process(Depot &depot, Request &command)
bincClient << "* BYE Timeout after " << IDLE_TIMEOUT << " seconds of inactivity."
<< endl;
session.setState(Session::LOGOUT);
- return NOTHING;
+ return Operator::ProcessResult::NOTHING;
}
}
@@ -181,7 +181,7 @@ Operator::ProcessResult IdleOperator::process(Depot &depot, Request &command)
close(newfd);
close(curfd);
#endif
- return NO;
+ return Operator::ProcessResult::NO;
}
#ifdef HAVE_FNOTIFY
@@ -211,21 +211,21 @@ Operator::ProcessResult IdleOperator::process(Depot &depot, Request &command)
close(newfd);
close(curfd);
#endif
- return OK;
+ return Operator::ProcessResult::OK;
}
-Operator::ParseResult IdleOperator::parse(Request &c_in) const
+Parser::ParseResult IdleOperator::parse(Request &c_in)
{
Session &session = Session::getInstance();
- if (c_in.getUidMode()) return REJECT;
+ if (c_in.getUidMode()) return Parser::ParseResult::REJECT;
- Operator::ParseResult res;
- if ((res = expectCRLF()) != ACCEPT) {
+ Parser::ParseResult res;
+ if ((res = expectCRLF()) != Parser::ParseResult::ACCEPT) {
session.setLastError("Expected CRLF after IDLE");
return res;
}
c_in.setName("IDLE");
- return ACCEPT;
+ return Parser::ParseResult::ACCEPT;
}