summaryrefslogtreecommitdiff
path: root/src/operator-unsubscribe.cc
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2023-10-11 21:49:37 +0200
committerJannis M. Hoffmann <jannis@fehcom.de>2023-10-11 21:49:37 +0200
commitbc946633e0bcae5fe63528ad743bcc67de7e347d (patch)
tree7a3d127148c13d84e92f38c319fb5aad1e88a6cb /src/operator-unsubscribe.cc
parent3ea7edf8c9bf7583c426178d4aaff4fb5b736bd2 (diff)
created a Parser class
Diffstat (limited to 'src/operator-unsubscribe.cc')
-rw-r--r--src/operator-unsubscribe.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/operator-unsubscribe.cc b/src/operator-unsubscribe.cc
index cafa10a..d2ef0c0 100644
--- a/src/operator-unsubscribe.cc
+++ b/src/operator-unsubscribe.cc
@@ -51,25 +51,25 @@ Operator::ProcessResult UnsubscribeOperator::process(Depot &depot, Request &comm
return ProcessResult::OK;
}
-Parser::ParseResult UnsubscribeOperator::parse(Request &c_in)
+Parser::ParseResult UnsubscribeOperator::parse(Request &c_in, Parser &p)
{
Session &session = Session::getInstance();
if (c_in.getUidMode()) return Parser::ParseResult::REJECT;
Parser::ParseResult res;
- if ((res = expectSPACE()) != Parser::ParseResult::ACCEPT) {
+ if ((res = p.expectSPACE()) != Parser::ParseResult::ACCEPT) {
session.setLastError("Expected SPACE");
return res;
}
string mailbox;
- if ((res = expectMailbox(mailbox)) != Parser::ParseResult::ACCEPT) {
+ if ((res = p.expectMailbox(mailbox)) != Parser::ParseResult::ACCEPT) {
session.setLastError("Expected mailbox");
return res;
}
- if ((res = expectCRLF()) != Parser::ParseResult::ACCEPT) {
+ if ((res = p.expectCRLF()) != Parser::ParseResult::ACCEPT) {
session.setLastError("Expected CRLF");
return res;
}