From 017f72d63d9fb70f812535736e5a57364014330e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volkan=20Yaz=C4=B1c=C4=B1?= <volkan.yazici@gmail.com> Date: Fri, 22 Feb 2013 13:16:08 +0200 Subject: [PATCH] Handle 'port' parameter of Jython in a similar way to REST and Controller classes. --- .../jython/JythonDebugInterface.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/floodlightcontroller/jython/JythonDebugInterface.java b/src/main/java/net/floodlightcontroller/jython/JythonDebugInterface.java index 213921b03..6f44b3d06 100644 --- a/src/main/java/net/floodlightcontroller/jython/JythonDebugInterface.java +++ b/src/main/java/net/floodlightcontroller/jython/JythonDebugInterface.java @@ -31,7 +31,7 @@ import net.floodlightcontroller.core.module.IFloodlightService; public class JythonDebugInterface implements IFloodlightModule { protected static Logger log = LoggerFactory.getLogger(JythonDebugInterface.class); protected JythonServer debug_server; - protected static int JYTHON_PORT = 6655; + protected int jythonPort = 6655; @Override public Collection<Class<? extends IFloodlightService>> getModuleServices() { @@ -72,11 +72,11 @@ public class JythonDebugInterface implements IFloodlightModule { // read our config options Map<String, String> configOptions = context.getConfigParams(this); - int port = JYTHON_PORT; - String portNum = configOptions.get("port"); - if (portNum != null) { - port = Integer.parseInt(portNum); + String port = configOptions.get("port"); + if (port != null) { + jythonPort = Integer.parseInt(port); } + log.debug("Jython port set to {}", jythonPort); JythonServer debug_server = new JythonServer(port, locals); debug_server.start(); -- GitLab