Changeset 469 for apps/iphone/superbook/trunk/DotTel_SDK/Classes
- Timestamp:
- 07/27/09 16:14:25 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
apps/iphone/superbook/trunk/DotTel_SDK/Classes/DnsResolver.m
r461 r469 49 49 } 50 50 51 - (NSUInteger)getNAPTRForTel:(NSString *)aDom inArray:(NSMutableArray *)naptrArray withError:(NSError **)error { 52 [aDom retain]; 53 ldns_rr_list *naptrs = [self retrieveResourceRecordsOfType:LDNS_RR_TYPE_NAPTR fromDomain:aDom withError:error]; 54 [aDom release]; 51 - (NSUInteger)getNAPTRForTel:(NSString *)domain inArray:(NSMutableArray *)naptrArray withError:(NSError **)error { 52 #ifdef DEBUG 53 NSLog(@"Domain %@: Retrieving NAPTR Records", domain); 54 #endif 55 ldns_rr_list *naptrs = [self retrieveResourceRecordsOfType:LDNS_RR_TYPE_NAPTR fromDomain:domain withError:error]; 55 56 if (!naptrs) { 56 57 return 0; … … 83 84 NSMutableString *_headerText = nil; 84 85 86 #ifdef DEBUG 87 NSLog(@"Domain %@: Retrieving TXT Records", domain); 88 #endif 85 89 ldns_rr_list *txts = [self retrieveResourceRecordsOfType:LDNS_RR_TYPE_TXT fromDomain:domain withError:error]; 86 90 if (!txts) { … … 122 126 // It's the responsibility of the caller to make sure the array is sent empty 123 127 128 #ifdef DEBUG 129 NSLog(@"Domain %@: Retrieving LOC Records", domain); 130 #endif 124 131 ldns_rr_list *locs = [self retrieveResourceRecordsOfType:LDNS_RR_TYPE_LOC fromDomain:domain withError:error]; 125 132 if (!locs) { … … 183 190 184 191 if (!ldnsdomain) { 185 //NSLog(@"Can't do ldns_dname_new_frm_str"); 192 #ifdef DEBUG 193 NSLog(@"Domain %@: Can't do ldns_dname_new_frm_str", domain); 194 #endif 186 195 dict = [NSDictionary dictionaryWithObject:NSLocalizedString(@"DNS Error: Can't parse resolver name", @"DNS Error resolver parsing") forKey:NSLocalizedDescriptionKey]; 187 196 err2 = [NSError errorWithDomain:@"org.telnic.tel.sdk" code:RESOLVER_STATUS_NO_NAME userInfo:dict]; … … 207 216 case 1: // always check for existence of p 208 217 if (!p) { 209 //NSLog(@"Can't do ldns_resolver_query"); 218 #ifdef DEBUG 219 NSLog(@"Domain %@: Can't do ldns_resolver_query (rr type %d)", domain, rrType); 220 #endif 210 221 dict = [NSDictionary dictionaryWithObject:NSLocalizedString(@"Network Error: No Internet Connection", @"Network error, no net connect") forKey:NSLocalizedDescriptionKey]; 211 222 err2 = [NSError errorWithDomain:@"org.telnic.tel.sdk" code:RESOLVER_STATUS_NO_CONNECTION userInfo:dict]; … … 226 237 LDNS_SECTION_ANSWER); 227 238 if (!rrlist) { 228 //NSLog(@" *** invalid answer name after query\n"); 239 #ifdef DEBUG 240 NSLog(@"Domain %@: invalid answer name after query (rr type %d)", domain, rrType); 241 #endif 229 242 if (ldns_pkt_get_rcode(p) == LDNS_RCODE_NXDOMAIN) { 230 243 dict = [NSDictionary dictionaryWithObject:NSLocalizedString(@"Domain does not exist", @"Non-existent domain") forKey:NSLocalizedDescriptionKey]; … … 245 258 } 246 259 @catch (NSException * e) { 260 #ifdef DEBUG 261 NSLog(@"Domain %@: ldns_rr_list_rr_count exception caught! (rr type %d)", domain, rrType); 262 #endif 247 263 // Exception is caught if there's no data in the rrlist, 248 264 // i.e. if there are no records. That's BAD.








