diff -r d4f75843cf5d -r 206db098f8c5 project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.m --- a/project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.m Sun Mar 25 21:17:01 2012 +0200 +++ b/project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.m Mon Mar 26 03:24:50 2012 +0200 @@ -20,13 +20,10 @@ #import "EngineProtocolNetwork.h" -#import "OverlayViewController.h" #define BUFFER_SIZE 255 // like in original frontend -static NSInteger activeEnginePort; - @implementation EngineProtocolNetwork @synthesize statsArray, stream, csd, enginePort; @@ -37,7 +34,6 @@ self.stream = nil; self.enginePort = [HWUtils randomPort]; } - activeEnginePort = self.enginePort; return self; } @@ -59,10 +55,6 @@ withObject:dictionary]; } -+(NSInteger) activeEnginePort { - return activeEnginePort; -} - #pragma mark - #pragma mark Provider functions // unpacks team data from the selected team.plist to a sequence of engine commands @@ -402,6 +394,7 @@ [self.stream release]; // Close the client socket + [HWUtils freePort:self.enginePort]; SDLNet_TCP_Close(csd); SDLNet_Quit();