equal
deleted
inserted
replaced
48 else |
48 else |
49 return (interfaceOrientation == UIInterfaceOrientationLandscapeRight); |
49 return (interfaceOrientation == UIInterfaceOrientationLandscapeRight); |
50 |
50 |
51 } |
51 } |
52 |
52 |
53 NSInteger randomPort() { |
53 NSInteger randomPort () { |
54 return (random() % 64541) + 1025; |
54 srandom(time(NULL)); |
|
55 return (random() % 64511) + 1024; |
55 } |
56 } |
56 |
57 |
|
58 void popError (const char *title, const char *message) { |
|
59 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[NSString stringWithUTF8String:title] |
|
60 message:[NSString stringWithUTF8String:message] |
|
61 delegate:nil |
|
62 cancelButtonTitle:@"Ok" |
|
63 otherButtonTitles:nil]; |
|
64 [alert show]; |
|
65 [alert release]; |
|
66 } |
|
67 |
57 |
68 |
|
69 |