1
0
Fork 0

Fixed port type issue

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

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

@ -33,7 +33,7 @@
[self readDefaults]; [self readDefaults];
// initialize the client // 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 = [NSTimer scheduledTimerWithTimeInterval:[[NSUserDefaults standardUserDefaults] integerForKey:@"refreshTime"] target:self selector:@selector(updateThroughput:) userInfo:nil repeats:YES];
//[_readTimer fire]; //[_readTimer fire];
@ -50,7 +50,7 @@
[AppMenu release]; [AppMenu release];
[_appMenu release]; [_appMenu release];
[ConfigPanel release]; [ConfigPanel release];
[BandwidthViewer release]; //[BandwidthViewer release];
[modalWindow release]; [modalWindow release];
[super dealloc]; [super dealloc];
} }
@ -408,7 +408,7 @@
//[wrtr doRequest:self requestSelector:@selector(wanRequestCallback:) uri:@"Status_Internet.live.asp"]; //[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 - (void) wanRequestCallback:(NSData *)data

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

@ -11,7 +11,7 @@
@implementation WRTStatusClient @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]; self = [super init];
@ -33,6 +33,7 @@
hostname, hostname,
port, port,
uri]; uri];
NSLog(@"Building request form %@", urlAddress);
NSURL *url = [NSURL URLWithString:urlAddress]; NSURL *url = [NSURL URLWithString:urlAddress];
@ -81,12 +82,12 @@
[old_hostname autorelease]; [old_hostname autorelease];
} }
- (NSInteger *) getPort - (int) getPort
{ {
return port; return port;
} }
- (void) setPort:(NSInteger *)new_port - (void) setPort:(int)new_port
{ {
port = new_port; port = new_port;
} }

Loading…
Cancel
Save