Changeset 2579

Show
Ignore:
Timestamp:
04/30/05 15:49:38 (3 years ago)
Author:
timothy
Message:

This disables all the DO stuff added a while back. It made things rather unstable and prone to deadlocks.
Fixes a deadlock when sending 6 or more lines of text at once. However, some minor delay might occur when sending.
Fixes ticket #102 and some of #130.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/MVIRCChatConnection.m

    r2568 r2579  
    10951095                while( ! irssiThreadReady ) usleep( 50 ); 
    10961096 
    1097               extern NSPort *threadConnectionPort; 
     1097/*            extern NSPort *threadConnectionPort; 
    10981098                NSConnection *threadConnection = [NSConnection connectionWithReceivePort:nil sendPort:threadConnectionPort]; 
    10991099                _irssiThreadConnection = [[(MVIRCConnectionThreadHelper *)[threadConnection rootProxy] vendChatConnection:self] retain]; 
     1100 
    11001101                NSConnection *connection = [NSConnection connectionWithReceivePort:[_irssiThreadConnection sendPort] sendPort:[_irssiThreadConnection receivePort]]; 
     1102                [connection setRequestTimeout:2.]; 
     1103                [connection setReplyTimeout:2.]; 
     1104 
    11011105                _irssiThreadProxy = [[connection rootProxy] retain]; 
    1102                 [(NSDistantObject *)_irssiThreadProxy setProtocolForProxy:@protocol( MVIRCChatConnectionIrssiThread )]; 
     1106                [(NSDistantObject *)_irssiThreadProxy setProtocolForProxy:@protocol( MVIRCChatConnectionIrssiThread )]; */ 
    11031107        } 
    11041108 
     
    11061110} 
    11071111 
    1108 - (void) release { 
     1112/* - (void) release { 
    11091113        if( ( [self retainCount] - 2 ) == 1 ) { 
    11101114                [MVIRCChatConnectionThreadLock lock]; 
     
    11211125 
    11221126        [super release]; 
    1123 } 
     1127} */ 
    11241128 
    11251129- (void) dealloc { 
     
    14501454        NSParameterAssert( raw != nil ); 
    14511455        if( ! _chatConnection ) return; 
    1452         [_irssiThreadProxy _sendRawMessage:raw immediately:now]; 
     1456//      [_irssiThreadProxy _sendRawMessage:raw immediately:now]; 
     1457        [self _sendRawMessage:raw immediately:now]; 
    14531458} 
    14541459 
     
    17031708        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 
    17041709 
    1705         MVIRCConnectionThreadHelper *helper = [[MVIRCConnectionThreadHelper alloc] init]; 
     1710/*      MVIRCConnectionThreadHelper *helper = [[MVIRCConnectionThreadHelper alloc] init]; 
     1711 
    17061712        NSConnection *server = [[NSConnection defaultConnection] retain]; 
    17071713        [server enableMultipleThreads]; 
     
    17091715 
    17101716        extern NSPort *threadConnectionPort; 
    1711         threadConnectionPort = [[[NSConnection defaultConnection] receivePort] retain]; 
     1717        threadConnectionPort = [[[NSConnection defaultConnection] receivePort] retain]; */ 
    17121718 
    17131719        GMainLoop *glibMainLoop = g_main_new( TRUE ); 
     
    17371743        core_deinit(); 
    17381744 
    1739       [threadConnectionPort release]; 
     1745/*    [threadConnectionPort release]; 
    17401746        threadConnectionPort = nil; 
    17411747 
    17421748        [server release]; 
    1743         [helper release]; 
     1749        [helper release]; */ 
    17441750 
    17451751        [MVIRCChatConnectionThreadLock unlock]; 
     
    19581964- (NSConnection *) vendChatConnection:(MVIRCChatConnection *) connection { 
    19591965        NSConnection *server = [[[NSConnection alloc] initWithReceivePort:[NSPort port] sendPort:[NSPort port]] autorelease]; 
     1966        [server setRequestTimeout:2.]; 
     1967        [server setReplyTimeout:2.]; 
    19601968        [server setRootObject:connection]; 
    19611969        [server enableMultipleThreads]; 
  • trunk/MVIRCChatRoom.m

    r2454 r2579  
    6464        NSParameterAssert( message != nil ); 
    6565        const char *msg = [MVIRCChatConnection _flattenedIRCStringForMessage:message withEncoding:encoding andChatFormat:[[self connection] outgoingChatFormat]]; 
    66         [[[self connection] _irssiThreadProxy] _sendMessage:msg toTarget:[self name] asAction:action]; 
     66//      [[[self connection] _irssiThreadProxy] _sendMessage:msg toTarget:[self name] asAction:action]; 
     67        [[self connection] _sendMessage:msg toTarget:[self name] asAction:action]; 
    6768} 
    6869 
  • trunk/MVIRCChatUser.m

    r2454 r2579  
    5050        NSParameterAssert( message != nil ); 
    5151        const char *msg = [MVIRCChatConnection _flattenedIRCStringForMessage:message withEncoding:encoding andChatFormat:[[self connection] outgoingChatFormat]]; 
    52         [[[self connection] _irssiThreadProxy] _sendMessage:msg toTarget:[self nickname] asAction:action]; 
     52//      [[[self connection] _irssiThreadProxy] _sendMessage:msg toTarget:[self nickname] asAction:action]; 
     53        [[self connection] _sendMessage:msg toTarget:[self nickname] asAction:action]; 
    5354} 
    5455 
  • trunk/Resources/Changes.rtf

    r2567 r2579  
    1 {\rtf1\mac\ansicpg10000\cocoartf102 
     1{\rtf1\mac\ansicpg10000\cocoartf824 
    22{\fonttbl\f0\fswiss\fcharset77 Arial-Black;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\ftech\fcharset2 Symbol; 
    33\f3\fswiss\fcharset77 Helvetica;\f4\fnil\fcharset77 Monaco;\f5\fswiss\fcharset77 Helvetica-Oblique; 
     
    2424\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 
    2525 
    26 \fs20 \cf0 Build 2D9  
     26\fs20 \cf0 Build 2D10  
     27\f3\b0 (scheduled for May 1, 2005) \'d1\ 
     28\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 
     29 
     30\f2 \cf0 \'b7 
     31\f3\fs24   
     32\fs20 Initial support for Spotlight, searching for nicknames will pull up relevant transcripts. 
     33\f1\b\fs28 \ 
     34 
     35\f2\b0\fs20 \'b7 
     36\f3\fs24   
     37\fs20 Fixes a deadlock when sending 6 or more lines of text at once. However, some minor delay might occur when sending. 
     38\f1\b\fs28 \ 
     39\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 
     40 
     41\fs20 \cf0 \ 
     42Build 2D9  
    2743\f3\b0 (April 28, 2005) \'d1\ 
    2844\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural