diff options
| author | Paul Buetow <paul@buetow.org> | 2008-06-03 14:57:27 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-06-03 14:57:27 +0000 |
| commit | f7bdf8a7f6ebd43bfacc22eeeda3eb52bf50efd7 (patch) | |
| tree | 38dba43c074d10466d206cdc07015b3e65735a9e /sources/protocols | |
| parent | b65cb84037cec3185aeed8b996455f8e97c17216 (diff) | |
Bugfixes:
VSTaskManager.getGlobalTask did not return all global tasks.
Extra check if a protocol has been initialized.
Diffstat (limited to 'sources/protocols')
| -rw-r--r-- | sources/protocols/VSAbstractProtocol.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sources/protocols/VSAbstractProtocol.java b/sources/protocols/VSAbstractProtocol.java index 30e664c..9999f62 100644 --- a/sources/protocols/VSAbstractProtocol.java +++ b/sources/protocols/VSAbstractProtocol.java @@ -54,6 +54,12 @@ abstract public class VSAbstractProtocol extends VSAbstractEvent { /** The protocol object is a client. */ private boolean isClient; + /** The protocol object server is initialized. */ + private boolean isServerInitialized; + + /** The protocol object client is initialized. */ + private boolean isClientInitialized; + /** The current protocol object's context is a server. */ private boolean currentContextIsServer; @@ -105,11 +111,15 @@ abstract public class VSAbstractProtocol extends VSAbstractEvent { if (hasOnServerStart) { if (isServer) { currentContextIsServer(true); + if (!isServerInitialized) + onInit(); onServerStart(); } } else { if (isClient) { currentContextIsServer(false); + if (!isClientInitialized) + onInit(); onClientStart(); } } @@ -122,11 +132,13 @@ abstract public class VSAbstractProtocol extends VSAbstractEvent { if (isClient) { currentContextIsServer(false); onClientInit(); + isClientInitialized = true; } if (isServer) { currentContextIsServer(true); onServerInit(); + isServerInitialized = true; } } @@ -161,11 +173,15 @@ abstract public class VSAbstractProtocol extends VSAbstractEvent { if (isServer) { currentContextIsServer(true); + if (!isServerInitialized) + onInit(); onServerRecv(message); } if (isClient) { currentContextIsServer(false); + if (!isClientInitialized) + onInit(); onClientRecv(message); } } |
