aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/imap/MCIMAPSession.cpp
diff options
context:
space:
mode:
authorGravatar libec <libor.huspenina@gmail.com>2015-11-07 21:02:04 +0100
committerGravatar libec <libor.huspenina@gmail.com>2015-11-07 21:02:04 +0100
commit703a580f1fe599f2dde7fec6c6e9a51ca47da34d (patch)
tree9689aad3943a884922ab4c50b2ca92a5c73fcc50 /src/core/imap/MCIMAPSession.cpp
parente8e41511e27e9b9f5d757bf2ac33871edd676ec4 (diff)
Adds error code to IMAPSession::customCommand. Renames sendCustomCommand to customCommand.
Diffstat (limited to 'src/core/imap/MCIMAPSession.cpp')
-rwxr-xr-xsrc/core/imap/MCIMAPSession.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/imap/MCIMAPSession.cpp b/src/core/imap/MCIMAPSession.cpp
index 69d80cc7..cbd94a2b 100755
--- a/src/core/imap/MCIMAPSession.cpp
+++ b/src/core/imap/MCIMAPSession.cpp
@@ -996,9 +996,16 @@ static uint64_t get_mod_sequence_value(mailimap * session)
return mod_sequence_value;
}
-String * IMAPSession::sendCustomCommand(String * command)
+String * IMAPSession::customCommand(String * command, ErrorCode * pError)
{
- mailimap_custom_command(mImap, MCUTF8(command));
+ int r;
+
+ r = mailimap_custom_command(mImap, MCUTF8(command));
+ if (r == MAILIMAP_ERROR_CUSTOM_COMMAND) {
+ * pError = ErrorCustomCommand;
+ return NULL;
+ }
+
String *response = String::stringWithUTF8Characters(mImap->imap_response);
return response;
}