Re: NSOperation Issues
Re: NSOperation Issues
- Subject: Re: NSOperation Issues
- From: Ken Thomases <email@hidden>
- Date: Mon, 21 Apr 2014 18:10:57 -0500
On Apr 21, 2014, at 5:47 PM, Varun Chandramohan wrote:
> op = [[QCCAESPadCryptor alloc] initToDecryptInputData:[NSData
> dataWithBytes:cyphertext_dat length:sizeof(cyphertext_dat)]
> keyData:[NSData
> dataWithBytes:key_dat length:sizeof(key_dat)]
> ];
> op.ivData = [NSData dataWithBytes:iv_dat length:sizeof(iv_dat)];
> queue = [[NSOperationQueue alloc] init];
> [queue addOperation:op];
> [queue waitUntilAllOperationsAreFinished];
> After [queue waitUntilAllOperationsAreFinished];
> op.outputData is nil. This was not the case before. I don’t know how to
> debug this.
It sounds like the operation's internal code failed or, possibly, that the operation was cancelled.
Check the value of [op isCancelled] and [op isFinished]. If it's finished and not cancelled, then it ran to completion and the problem has nothing to do with the operation queue. I don't have any idea why it might have failed. That would be a matter of the implementation of QCCAESPadCryptor and/or the specific cypher text, key, and input data you're passing it.
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden