BLIP/BLIPConnection.m
changeset 53 e9f209a24d53
parent 19 16454d63d4c2
child 63 5e4855a592ee
     1.1 --- a/BLIP/BLIPConnection.m	Mon Jun 23 14:02:31 2008 -0700
     1.2 +++ b/BLIP/BLIPConnection.m	Tue Jun 23 12:46:40 2009 -0700
     1.3 @@ -121,6 +121,12 @@
     1.4  
     1.5  - (BLIPResponse*) sendRequest: (BLIPRequest*)request
     1.6  {
     1.7 +    if (!request.isMine || request.sent) {
     1.8 +        // This was an incoming request that I'm being asked to forward or echo;
     1.9 +        // or it's an outgoing request being sent to multiple connections.
    1.10 +        // Since a particular BLIPRequest can only be sent once, make a copy of it to send:
    1.11 +        request = [[request mutableCopy] autorelease];
    1.12 +    }
    1.13      BLIPConnection *itsConnection = request.connection;
    1.14      if( itsConnection==nil )
    1.15          request.connection = self;
    1.16 @@ -187,9 +193,9 @@
    1.17  #pragma mark -
    1.18  @implementation BLIPListener
    1.19  
    1.20 -- (id) initWithPort: (UInt16)port
    1.21 +- (id) init
    1.22  {
    1.23 -    self = [super initWithPort: port];
    1.24 +    self = [super init];
    1.25      if (self != nil) {
    1.26          self.connectionClass = [BLIPConnection class];
    1.27      }