1.1 --- a/PortMapper/MYDNSService.m Wed Apr 29 13:29:31 2009 -0700
1.2 +++ b/PortMapper/MYDNSService.m Fri Jul 03 17:50:28 2009 -0700
1.3 @@ -143,6 +143,11 @@
1.4 }
1.5
1.6
1.7 +- (BOOL) isRunning {
1.8 + return _serviceRef != NULL;
1.9 +}
1.10 +
1.11 +
1.12 + (NSString*) fullNameOfService: (NSString*)serviceName
1.13 ofType: (NSString*)type
1.14 inDomain: (NSString*)domain
1.15 @@ -291,8 +296,12 @@
1.16 NSAutoreleasePool *pool = [NSAutoreleasePool new];
1.17 LogTo(DNS,@"---serviceCallback----");
1.18 DNSServiceErrorType err = DNSServiceProcessResult(_connectionRef);
1.19 - if (err)
1.20 + if (err) {
1.21 Warn(@"%@: DNSServiceProcessResult failed, err=%i !!!", self,err);
1.22 + //FIX: Are errors here fatal, meaning I should close the connection?
1.23 + // I've run into infinite loops constantly getting kDNSServiceErr_ServiceNotRunning
1.24 + // or kDNSServiceErr_BadReference ...
1.25 + }
1.26 [pool drain];
1.27 return !err;
1.28 }