--- a/cocoaTouch/otherSrc/CommodityFunctions.m Wed Apr 28 05:58:14 2010 +0000
+++ b/cocoaTouch/otherSrc/CommodityFunctions.m Thu Apr 29 02:43:28 2010 +0000
@@ -50,8 +50,20 @@
}
-NSInteger randomPort() {
- return (random() % 64541) + 1025;
+NSInteger randomPort () {
+ srandom(time(NULL));
+ return (random() % 64511) + 1024;
}
+void popError (const char *title, const char *message) {
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[NSString stringWithUTF8String:title]
+ message:[NSString stringWithUTF8String:message]
+ delegate:nil
+ cancelButtonTitle:@"Ok"
+ otherButtonTitles:nil];
+ [alert show];
+ [alert release];
+}
+
+