aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc/smtp
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-06-30 23:45:48 -0400
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-06-30 23:46:08 -0400
commit9fe6ce12c4880a6c2f2a4180752987dd30d65c89 (patch)
treea4a7d491f00284ea48a1066cf968f2954acd9d7f /src/objc/smtp
parent03ee1a21bf450487f688d42c2eee11ca0f3cef81 (diff)
Fixed regression introduced in de51dd02d4c16d5c6bc89a2fe0e49ffda79f2a33
Diffstat (limited to 'src/objc/smtp')
-rw-r--r--src/objc/smtp/MCOSMTPSendOperation.mm12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/objc/smtp/MCOSMTPSendOperation.mm b/src/objc/smtp/MCOSMTPSendOperation.mm
index 776f7270..8a7d5b04 100644
--- a/src/objc/smtp/MCOSMTPSendOperation.mm
+++ b/src/objc/smtp/MCOSMTPSendOperation.mm
@@ -80,6 +80,18 @@ private:
[self start];
}
+// This method needs to be duplicated from MCOSMTPOperation since _completionBlock
+// references the instance of this subclass and not the one from MCOSMTPOperation.
+- (void)operationCompleted {
+ if (_completionBlock == NULL)
+ return;
+
+ NSError * error = [NSError mco_errorWithErrorCode:MCO_NATIVE_INSTANCE->error()];
+ _completionBlock(error);
+ [_completionBlock release];
+ _completionBlock = NULL;
+}
+
- (void) bodyProgress:(unsigned int)current maximum:(unsigned int)maximum
{
if (_progress != NULL) {