Merge pull request #76 from evanlong/master
Fixing a couple of issues in the JSON and XML operation classes
This commit is contained in:
commit
810096b37d
2 changed files with 3 additions and 3 deletions
|
|
@ -65,9 +65,7 @@ static dispatch_queue_t json_request_operation_processing_queue() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dispatch_async(json_request_operation_processing_queue(), ^(void) {
|
dispatch_async(json_request_operation_processing_queue(), ^(void) {
|
||||||
NSError *error = nil;
|
|
||||||
id JSON = operation.responseJSON;
|
id JSON = operation.responseJSON;
|
||||||
operation.error = error;
|
|
||||||
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^(void) {
|
dispatch_async(dispatch_get_main_queue(), ^(void) {
|
||||||
if (operation.error) {
|
if (operation.error) {
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,9 @@ static dispatch_queue_t xml_request_operation_processing_queue() {
|
||||||
} else {
|
} else {
|
||||||
NSXMLParser *XMLParser = operation.responseXMLParser;
|
NSXMLParser *XMLParser = operation.responseXMLParser;
|
||||||
if (success) {
|
if (success) {
|
||||||
success(operation.request, operation.response, XMLParser);
|
dispatch_async(dispatch_get_main_queue(), ^(void) {
|
||||||
|
success(operation.request, operation.response, XMLParser);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue