Browse Source

fixed services start bug

Alexander Brakowski 10 years ago
parent
commit
aebd46edc5

+ 4 - 1
src/de/tudarmstadt/informatik/hostage/persistence/ProfileManager.java

@@ -403,10 +403,13 @@ public class ProfileManager {
 		if(MainActivity.getInstance().getHostageService() != null){
 			if(MainActivity.getInstance().getHostageService().hasRunningListeners()){
 				List<String> protocolsToStart = profile.getActiveProtocols();
+				if(profile.mGhostActive){
+					protocolsToStart.add("GHOST");
+				}
 
 				for(Listener listener: MainActivity.getInstance().getHostageService().getListeners()){
 					if(listener.isRunning()){
-						if(protocolsToStart.contains(listener.getProtocolName())){
+						if(protocolsToStart.contains(listener.getProtocolName()) && !listener.getProtocolName().equals("GHOST")){
 							protocolsToStart.remove(listener.getProtocolName());
 						} else {
 							MainActivity.getInstance().getHostageService().stopListenerAllPorts(listener.getProtocolName());