diff options
author | siqi <me@siqi.fr> | 2013-06-05 10:57:00 +0200 |
---|---|---|
committer | siqi <me@siqi.fr> | 2013-06-07 18:33:52 +0200 |
commit | f78070377035eaafd51a1eb36c821e131c987887 (patch) | |
tree | 9d4b4cccff825b4dc6ec7f61ae5bbc998cf94318 /ios | |
parent | cc630e3d8ee5d07b7341b071443845ef309eeeb2 (diff) |
autogen client pin
Diffstat (limited to 'ios')
-rw-r--r-- | ios/iosremote/iosremote/Communication/Client.m | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ios/iosremote/iosremote/Communication/Client.m b/ios/iosremote/iosremote/Communication/Client.m index b5e6644cbff7..37ac0e92c85c 100644 --- a/ios/iosremote/iosremote/Communication/Client.m +++ b/ios/iosremote/iosremote/Communication/Client.m @@ -50,7 +50,7 @@ NSString * const CHARSET = @"UTF-8"; managedBy:(CommunicationManager*)manager interpretedBy:(Receiver*)receiver { - self.mPin = [NSString stringWithFormat:@"%04d", arc4random() % 9999]; + self.mPin = [self getPin]; NSLog(@"mPin: %@", self.mPin); self.mName = [[UIDevice currentDevice] name]; self.mServer = server; @@ -62,6 +62,12 @@ NSString * const CHARSET = @"UTF-8"; return self; } +- (NSString *) getPin +{ + + NSString* newPin = [NSString stringWithFormat:@"%04d", arc4random() % 9999]; +} + - (void)streamOpenWithIp:(NSString *)ip withPortNumber:(uint)portNumber { NSLog(@"Connecting to %@:%u", ip, portNumber); |