Changeset 3118
- Timestamp:
- 02/06/06 23:45:58 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/cocoa-networking/Chat Core/MVIRCChatConnection.m
r3117 r3118 296 296 - (id) init { 297 297 if( ( self = [super init] ) ) { 298 _chatConnection = [[AsyncSocket allocWithZone:nil] initWithDelegate:self];299 300 298 _serverPort = 6667; 301 299 _server = @"irc.freenode.net"; … … 371 369 } 372 370 373 [_lastConnectAttempt release]; 371 id old = _chatConnection; 372 _chatConnection = [[AsyncSocket allocWithZone:nil] initWithDelegate:self]; 373 [old setDelegate:nil]; 374 [old release]; 375 376 old = _lastConnectAttempt; 374 377 _lastConnectAttempt = [[NSDate allocWithZone:nil] init]; 378 [old release]; 375 379 376 380 [self _willConnect]; // call early so other code has a chance to change our info … … 383 387 384 388 [self performSelector:@selector( _connect ) inThread:_connectionThread]; 385 386 /*387 // Setup the proxy header with the most current connection address and port.388 if( _proxy == MVChatConnectionHTTPSProxy || _proxy == MVChatConnectionHTTPProxy ) {389 NSString *userCombo = [NSString stringWithFormat:@"%@:%@", _proxyUsername, _proxyPassword];390 NSData *combo = [userCombo dataUsingEncoding:NSASCIIStringEncoding];391 392 g_free_not_null( _chatConnectionSettings -> proxy_string );393 if( [combo length] > 1 ) {394 NSString *userCombo = [combo base64EncodingWithLineLength:0];395 _chatConnectionSettings -> proxy_string = g_strdup_printf( "CONNECT %s:%d HTTP/1.0\r\nProxy-Authorization: Basic %s\r\n\r\n", _chatConnectionSettings -> address, _chatConnectionSettings -> port, [userCombo UTF8String] );396 } else _chatConnectionSettings -> proxy_string = g_strdup_printf( "CONNECT %s:%d HTTP/1.0\r\n\r\n", _chatConnectionSettings -> address, _chatConnectionSettings -> port );397 398 g_free_not_null( _chatConnectionSettings -> proxy_string_after );399 _chatConnectionSettings -> proxy_string_after = NULL;400 }401 */402 389 } 403 390 … … 766 753 id old = _localUser; 767 754 _localUser = nil; 755 [old release]; 756 757 old = _chatConnection; 758 _chatConnection = nil; 759 [old setDelegate:nil]; 768 760 [old release]; 769 761
