Changeset 3790
- Timestamp:
- 07/14/08 02:52:03 (4 months ago)
- Files:
-
- trunk/Chat Core/MVDirectChatConnection.h (modified) (2 diffs)
- trunk/Chat Core/MVDirectChatConnection.m (modified) (5 diffs)
- trunk/Chat Core/MVDirectChatConnectionPrivate.h (modified) (1 diff)
- trunk/Chat Core/MVFileTransfer.h (modified) (3 diffs)
- trunk/Chat Core/MVFileTransfer.m (modified) (2 diffs)
- trunk/Chat Core/MVFileTransferPrivate.h (modified) (1 diff)
- trunk/Chat Core/MVIRCChatConnection.m (modified) (4 diffs)
- trunk/Chat Core/MVIRCFileTransfer.m (modified) (3 diffs)
- trunk/Panels/JVDirectChatPanel.m (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Chat Core/MVDirectChatConnection.h
r3722 r3790 26 26 MVChatMessageFormat _outgoingChatFormat; 27 27 NSStringEncoding _encoding; 28 NS Host*_host;29 NS Host*_connectedHost;28 NSString *_host; 29 NSString *_connectedHost; 30 30 BOOL _passive; 31 31 BOOL _localRequest; … … 44 44 45 45 - (MVChatUser *) user; 46 - (NS Host*) host;47 - (NS Host*) connectedHost;46 - (NSString *) host; 47 - (NSString *) connectedHost; 48 48 - (unsigned short) port; 49 49 trunk/Chat Core/MVDirectChatConnection.m
r3722 r3790 97 97 } 98 98 99 - (NS Host*) host {99 - (NSString *) host { 100 100 return _host; 101 101 } 102 102 103 - (NS Host*) connectedHost {103 - (NSString *) connectedHost { 104 104 return _connectedHost; 105 105 } … … 123 123 if( _localRequest ) { 124 124 if( ! [self isPassive] ) [_directClientConnection acceptConnectionOnFirstPortInRange:[MVFileTransfer fileTransferPortRange]]; 125 else [_directClientConnection connectToHost:[ [self host] address] onPort:[self port]];125 else [_directClientConnection connectToHost:[self host] onPort:[self port]]; 126 126 } else { 127 127 if( [self isPassive] ) [_directClientConnection acceptConnectionOnFirstPortInRange:[MVFileTransfer fileTransferPortRange]]; 128 else [_directClientConnection connectToHost:[ [self host] address] onPort:[self port]];128 else [_directClientConnection connectToHost:[self host] onPort:[self port]]; 129 129 } 130 130 } … … 219 219 [self _setStatus:MVDirectChatConnectionConnectedStatus]; 220 220 221 MVSafeRetainAssign( &_connectedHost, [NSHost hostWithAddress:host]);221 MVSafeRetainAssign( &_connectedHost, host ); 222 222 223 223 [self _readNextMessage]; … … 297 297 _outgoingChatFormat = MVChatConnectionDefaultMessageFormat; 298 298 _user = [chatUser retain]; 299 _host = [[NSHost currentHost] retain];300 299 } 301 300 … … 330 329 } 331 330 332 - (void) _setHost:(NS Host*) newHost {331 - (void) _setHost:(NSString *) newHost { 333 332 MVSafeRetainAssign( &_host, newHost ); 334 333 } trunk/Chat Core/MVDirectChatConnectionPrivate.h
r3545 r3790 8 8 9 9 - (void) _setStatus:(MVDirectChatConnectionStatus) status; 10 - (void) _setHost:(NS Host*) host;10 - (void) _setHost:(NSString *) host; 11 11 - (void) _setPort:(unsigned short) port; 12 12 - (void) _setPassive:(BOOL) passive; trunk/Chat Core/MVFileTransfer.h
r3778 r3790 31 31 unsigned long long _transfered; 32 32 NSDate *_startDate; 33 NS Host*_host;33 NSString *_host; 34 34 BOOL _passive; 35 35 unsigned short _port; … … 59 59 @property(readonly) unsigned long long startOffset; 60 60 61 @property(readonly) NS Host*host;61 @property(readonly) NSString *host; 62 62 @property(readonly) unsigned short port; 63 63 … … 75 75 - (unsigned long long) startOffset; 76 76 77 - (NS Host*) host;77 - (NSString *) host; 78 78 - (unsigned short) port; 79 79 trunk/Chat Core/MVFileTransfer.m
r3778 r3790 122 122 #pragma mark - 123 123 124 - (NS Host*) host {124 - (NSString *) host { 125 125 return _host; 126 126 } … … 167 167 } 168 168 169 - (void) _setHost:(NS Host*) newHost {169 - (void) _setHost:(NSString *) newHost { 170 170 MVSafeRetainAssign( &_host, newHost ); 171 171 } trunk/Chat Core/MVFileTransferPrivate.h
r3150 r3790 7 7 - (void) _setStartOffset:(unsigned long long) startOffset; 8 8 - (void) _setStartDate:(NSDate *) startDate; 9 - (void) _setHost:(NS Host*) host;9 - (void) _setHost:(NSString *) host; 10 10 - (void) _setPort:(unsigned short) port; 11 11 - (void) _setPassive:(BOOL) passive; trunk/Chat Core/MVIRCChatConnection.m
r3769 r3790 1806 1806 1807 1807 if( transfer ) { 1808 [transfer _setHost: [NSHost hostWithAddress:address]];1808 [transfer _setHost:address]; 1809 1809 [transfer _setPort:port]; 1810 1810 [transfer _setupAndStart]; … … 1817 1817 [transfer _setPassive:YES]; 1818 1818 } else { 1819 [transfer _setHost: [NSHost hostWithAddress:address]];1819 [transfer _setHost:address]; 1820 1820 [transfer _setPort:port]; 1821 1821 } … … 1941 1941 1942 1942 if( directChat ) { 1943 [directChat _setHost: [NSHost hostWithAddress:address]];1943 [directChat _setHost:address]; 1944 1944 [directChat _setPort:port]; 1945 1945 [directChat initiate]; … … 1952 1952 [directChatConnection _setPassive:YES]; 1953 1953 } else { 1954 [directChatConnection _setHost: [NSHost hostWithAddress:address]];1954 [directChatConnection _setHost:address]; 1955 1955 [directChatConnection _setPort:port]; 1956 1956 } trunk/Chat Core/MVIRCFileTransfer.m
r3783 r3790 183 183 184 184 if( ! [self isPassive] ) [_directClientConnection acceptConnectionOnFirstPortInRange:[[self class] fileTransferPortRange]]; 185 else [_directClientConnection connectToHost:[ [self host] address] onPort:[self port]];185 else [_directClientConnection connectToHost:[self host] onPort:[self port]]; 186 186 } 187 187 … … 263 263 else [[self user] sendSubcodeReply:@"DCC" withArguments:[NSString stringWithFormat:@"REJECT SEND %@ 16843009 0 %llu %lu T", [self originalFileName], [self finalSize], [self _passiveIdentifier]]]; 264 264 } else { 265 NSString *address = [ [self host] address];265 NSString *address = [self host]; 266 266 if( ! address ) address = @"16843009"; 267 267 if( address && [address rangeOfString:@"."].location != NSNotFound ) … … 394 394 395 395 if( [self isPassive] ) [_directClientConnection acceptConnectionOnFirstPortInRange:[[self class] fileTransferPortRange]]; 396 else [_directClientConnection connectToHost:[ [self host] address] onPort:[self port]];396 else [_directClientConnection connectToHost:[self host] onPort:[self port]]; 397 397 } 398 398 trunk/Panels/JVDirectChatPanel.m
r3784 r3790 395 395 396 396 if( [[self target] isKindOfClass:[MVDirectChatConnection class]] ) { 397 NSString *host = [ [(MVDirectChatConnection *)[self target] connectedHost] name];397 NSString *host = [(MVDirectChatConnection *)[self target] connectedHost]; 398 398 if( ! [host length] ) host = [[self user] address]; 399 399 if( [host length] ) return [NSString stringWithFormat:@"%@ (%@)", [self title], host]; … … 413 413 return NSLocalizedString( @"disconnected", "disconnected information" ); 414 414 415 NSString *host = [ [(MVDirectChatConnection *)[self target] connectedHost] name];415 NSString *host = [(MVDirectChatConnection *)[self target] connectedHost]; 416 416 if( ! [host length] ) host = [[self user] address]; 417 417 return host; … … 437 437 info = NSLocalizedString( @"disconnected", "disconnected tooltip" ); 438 438 else { 439 info = [ [(MVDirectChatConnection *)[self target] connectedHost] name];439 info = [(MVDirectChatConnection *)[self target] connectedHost]; 440 440 if( ! [info length] ) info = [[self user] address]; 441 441 }
