1
0
Fork 0

Fixed port type issue

master
Matthieu Lalonde 13 years ago
parent 33fe9832c8
commit 9ca91187d3

@ -54,10 +54,10 @@
// application prefs:
NSString *hostname;
NSInteger port;
NSString *username;
NSString *password;
NSString *hostname;
int port;
NSString *username;
NSString *password;
int refreshTime;
bool useBytes;

@ -33,7 +33,7 @@
[self readDefaults];
// initialize the client
wrt_client = [[WRTStatusClient alloc] initWithHostname:hostname port:&port username:username password:password];
wrt_client = [[WRTStatusClient alloc] initWithHostname:hostname port:port username:username password:password];
//_readTimer = [NSTimer scheduledTimerWithTimeInterval:[[NSUserDefaults standardUserDefaults] integerForKey:@"refreshTime"] target:self selector:@selector(updateThroughput:) userInfo:nil repeats:YES];
//[_readTimer fire];
@ -50,7 +50,7 @@
[AppMenu release];
[_appMenu release];
[ConfigPanel release];
[BandwidthViewer release];
//[BandwidthViewer release];
[modalWindow release];
[super dealloc];
}
@ -408,7 +408,7 @@
//[wrtr doRequest:self requestSelector:@selector(wanRequestCallback:) uri:@"Status_Internet.live.asp"];
[wrt_client getStatusUpdate:@"Status_Bandwidth.asp" delegate:wanRequestCallback];
//[wrt_client getStatusUpdate:@"Status_Bandwidth.asp" delegate:wanRequestCallback];
}
- (void) wanRequestCallback:(NSData *)data

@ -13,7 +13,7 @@
BOOL wrtReachable;
@private
NSString *hostname;
NSInteger *port;
int port;
NSString *username;
NSString *password;
@ -26,7 +26,7 @@
//SEL errorCallback;
}
- (id) initWithHostname:(NSString*)new_hostname port:(NSInteger*)new_port username:(NSString*)new_username password:(NSString*)new_password;
- (id) initWithHostname:(NSString*)new_hostname port:(int)new_port username:(NSString*)new_username password:(NSString*)new_password;
- (NSMutableURLRequest*) buildRequest:(NSString*)uri;
- (NSMutableURLRequest*) requestForBandwidthViewerForInterface:(NSString*)interface;
@ -35,8 +35,8 @@
- (NSString*) getHostname;
- (void) setHostname:(NSString*)new_hostname;
- (NSInteger*) getPort;
- (void) setPort:(NSInteger*)new_port;
- (int) getPort;
- (void) setPort:(int)new_port;
- (NSString*) getUsername;
- (void) setUsername:(NSString*)new_username;

@ -11,7 +11,7 @@
@implementation WRTStatusClient
- (id) initWithHostname:(NSString*)new_hostname port:(NSInteger*)new_port username:(NSString*)new_username password:(NSString*)new_password
- (id) initWithHostname:(NSString*)new_hostname port:(int)new_port username:(NSString*)new_username password:(NSString*)new_password
{
self = [super init];
@ -33,7 +33,8 @@
hostname,
port,
uri];
NSLog(@"Building request form %@", urlAddress);
NSURL *url = [NSURL URLWithString:urlAddress];
//[self request:url]; // ---V
@ -81,12 +82,12 @@
[old_hostname autorelease];
}
- (NSInteger *) getPort
- (int) getPort
{
return port;
}
- (void) setPort:(NSInteger *)new_port
- (void) setPort:(int)new_port
{
port = new_port;
}

Loading…
Cancel
Save