Changeset 4285
- Timestamp:
- 06/10/06 01:38:33 (2 years ago)
- Files:
-
- WiredClient/trunk/WCConnection.h (modified) (1 diff)
- WiredClient/trunk/WCServerConnection.h (modified) (1 diff)
- WiredClient/trunk/WCServerConnection.m (modified) (2 diffs)
- WiredClient/trunk/WCTrackerConnection.h (modified) (1 diff)
- WiredClient/trunk/WCTrackerConnection.m (modified) (2 diffs)
- WiredClient/trunk/WCTransfers.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/WCConnection.h
r3963 r4285 127 127 - (void)sendCommand:(NSString *)command withArgument:(NSString *)argument1 withArgument:(NSString *)argument2 withArgument:(NSString *)argument3; 128 128 - (void)sendCommand:(NSString *)command withArguments:(NSArray *)arguments; 129 - (void)ignoreError:(unsigned int)error; 129 130 130 131 - (void)connect; WiredClient/trunk/WCServerConnection.h
r4148 r4285 58 58 WCServerInfo *_serverInfo; 59 59 WCTransfers *_transfers; 60 61 unsigned int _ignoreErrorMessage; 62 NSTimeInterval _ignoreErrorTime; 60 63 61 64 BOOL _sentLogin; WiredClient/trunk/WCServerConnection.m
r4184 r4285 631 631 632 632 633 - (void)ignoreError:(unsigned int)error { 634 _ignoreErrorMessage = error; 635 _ignoreErrorTime = [NSDate timeIntervalSinceReferenceDate]; 636 } 637 638 639 633 640 #pragma mark - 634 641 … … 825 832 default: 826 833 if(message >= 500 && message <= 599) { 827 name = WCConnectionReceivedError; 828 error = [WCError errorWithDomain:WCWiredErrorDomain 829 code:message 830 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: 831 [arguments safeObjectAtIndex:0], WIArgumentErrorKey, 832 NULL]]; 833 834 [userInfo setObject:error forKey:WCErrorKey]; 834 if(_ignoreErrorMessage != message || _ignoreErrorTime < [NSDate timeIntervalSinceReferenceDate] - 5.0) { 835 name = WCConnectionReceivedError; 836 error = [WCError errorWithDomain:WCWiredErrorDomain 837 code:message 838 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: 839 [arguments safeObjectAtIndex:0], WIArgumentErrorKey, 840 NULL]]; 841 842 [userInfo setObject:error forKey:WCErrorKey]; 843 } 844 845 _ignoreErrorMessage = 0; 835 846 } 836 847 break; WiredClient/trunk/WCTrackerConnection.h
r3503 r4285 37 37 NSNotificationCenter *_notificationCenter; 38 38 39 unsigned int _ignoreErrorMessage; 40 NSTimeInterval _ignoreErrorTime; 41 39 42 BOOL _terminate; 40 43 } WiredClient/trunk/WCTrackerConnection.m
r4183 r4285 232 232 233 233 234 - (void)ignoreError:(unsigned int)error { 235 _ignoreErrorMessage = error; 236 _ignoreErrorTime = [NSDate timeIntervalSinceReferenceDate]; 237 } 238 239 240 234 241 #pragma mark - 235 242 … … 294 301 default: 295 302 if(message >= 500 && message <= 599) { 296 name = WCConnectionReceivedError; 297 error = [WCError errorWithDomain:WCWiredErrorDomain 298 code:message 299 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: 300 [arguments safeObjectAtIndex:0], WIArgumentErrorKey, 301 NULL]]; 303 if(_ignoreErrorMessage != message || _ignoreErrorTime < [NSDate timeIntervalSinceReferenceDate] - 5.0) { 304 name = WCConnectionReceivedError; 305 error = [WCError errorWithDomain:WCWiredErrorDomain 306 code:message 307 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: 308 [arguments safeObjectAtIndex:0], WIArgumentErrorKey, 309 NULL]]; 310 311 [userInfo setObject:error forKey:WCErrorKey]; 312 } 302 313 303 [userInfo setObject:error forKey:WCErrorKey];314 _ignoreErrorMessage = 0; 304 315 } 305 316 break; WiredClient/trunk/WCTransfers.m
r4284 r4285 644 644 645 645 if([[NSFileManager defaultManager] directoryExistsAtPath:path]) { 646 [[self connection] ignoreError:521]; 646 647 [[self connection] sendCommand:WCFolderCommand withArgument:remotePath]; 647 648
