git.ithinksw.org
/
MenuTunes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e6737bc
)
More toying with network stuff. Hopefully fixed more problems without making even...
author
Kent Sutherland
<ksuther@ithinksw.com>
Thu, 11 Dec 2003 22:19:49 +0000
(22:19 +0000)
committer
Kent Sutherland
<ksuther@ithinksw.com>
Thu, 11 Dec 2003 22:19:49 +0000
(22:19 +0000)
MainController.m
patch
|
blob
|
history
NetworkController.h
patch
|
blob
|
history
NetworkController.m
patch
|
blob
|
history
PreferencesController.m
patch
|
blob
|
history
libValidate.a
patch
|
blob
|
history
diff --git
a/MainController.m
b/MainController.m
index
3c1cb6c
..
dafd199
100755
(executable)
--- a/
MainController.m
+++ b/
MainController.m
@@
-290,9
+290,6
@@
static MainController *sharedController;
{
if ([networkController isConnectedToServer]) {
[statusItem setMenu:[menuController menu]];
{
if ([networkController isConnectedToServer]) {
[statusItem setMenu:[menuController menu]];
- if ([[networkController networkObject] remote] == nil) {
- [self networkError:nil];
- }
}
if ( [self songChanged] && (timerUpdating != YES) ) {
}
if ( [self songChanged] && (timerUpdating != YES) ) {
@@
-502,6
+499,10
@@
static MainController *sharedController;
- (ITMTRemote *)currentRemote
{
- (ITMTRemote *)currentRemote
{
+ if ([networkController isConnectedToServer] && ![[networkController networkObject] isValid]) {
+ [self networkError:nil];
+ return nil;
+ }
return currentRemote;
}
return currentRemote;
}
diff --git
a/NetworkController.h
b/NetworkController.h
index
57eee2e
..
62f221e
100755
(executable)
--- a/
NetworkController.h
+++ b/
NetworkController.h
@@
-39,6
+39,7
@@
- (int)connectToHost:(NSString *)host;
- (BOOL)checkForServerAtHost:(NSString *)host;
- (BOOL)disconnect;
- (int)connectToHost:(NSString *)host;
- (BOOL)checkForServerAtHost:(NSString *)host;
- (BOOL)disconnect;
+- (void)resetServerName;
- (BOOL)isServerOn;
- (BOOL)isClientConnected;
- (BOOL)isConnectedToServer;
- (BOOL)isServerOn;
- (BOOL)isClientConnected;
- (BOOL)isConnectedToServer;
diff --git
a/NetworkController.m
b/NetworkController.m
index
6c9631c
..
f2989e3
100755
(executable)
--- a/
NetworkController.m
+++ b/
NetworkController.m
@@
-111,6
+111,7
@@
static NetworkController *sharedController;
} else if (serverOn && !status && [serverConnection isValid]) {
//Turn off
[service stop];
} else if (serverOn && !status && [serverConnection isValid]) {
//Turn off
[service stop];
+ [service release];
[rootObject invalidate];
[serverConnection registerName:nil];
[serverConnection invalidate];
[rootObject invalidate];
[serverConnection registerName:nil];
[serverConnection invalidate];
@@
-240,6
+241,18
@@
static NetworkController *sharedController;
return valid;
}
return valid;
}
+- (void)resetServerName
+{
+ if ([self isServerOn]) {
+ [service stop];
+ [service release];
+ service = [[NSNetService alloc] initWithDomain:@""
+ type:@"_mttp._tcp."
+ name:[[NSUserDefaults standardUserDefaults] stringForKey:@"sharedPlayerName"]
+ port:SERVER_PORT];
+ }
+}
+
- (BOOL)isServerOn
{
return serverOn;
- (BOOL)isServerOn
{
return serverOn;
diff --git
a/PreferencesController.m
b/PreferencesController.m
index
6f18bc0
..
7bc3db8
100755
(executable)
--- a/
PreferencesController.m
+++ b/
PreferencesController.m
@@
-244,6
+244,7
@@
static PreferencesController *prefs = nil;
[controller setServerStatus:state]; //Set server status
} else if ( [sender tag] == 5015 ) {
[df setObject:[sender stringValue] forKey:@"sharedPlayerName"];
[controller setServerStatus:state]; //Set server status
} else if ( [sender tag] == 5015 ) {
[df setObject:[sender stringValue] forKey:@"sharedPlayerName"];
+ [[NetworkController sharedController] resetServerName];
} else if ( [sender tag] == 5020 ) {
[df setBool:SENDER_STATE forKey:@"enableSharingPassword"];
} else if ( [sender tag] == 5030 ) {
} else if ( [sender tag] == 5020 ) {
[df setBool:SENDER_STATE forKey:@"enableSharingPassword"];
} else if ( [sender tag] == 5030 ) {
diff --git
a/libValidate.a
b/libValidate.a
index
eb23cd2
..
336b657
100755
(executable)
Binary files a/libValidate.a and b/libValidate.a differ