Ignore:
Timestamp:
2011-08-23T20:28:57+12:00 (13 years ago)
Author:
ak19
Message:

Better way to ensure that the port is not arbitrarily modified. This bypasses the need to turn on the Do Not Modify Port server setting option by default, which then bypasses the need to make 8282 the default port for GS2 (which would have been necessary since the old GS2 default port of 80 would not have coped well with the Do Not Modify Port switch turned on by default).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/server/BaseServerSettings.java

    r24233 r24455  
    234234        // save everything to config_properties if things have changed
    235235        boolean has_changed = false;
    236             boolean require_restart = false;
     236        boolean require_restart = false;
     237        boolean port_has_changed = false;
    237238
    238239        if (portNum != ((Integer)portNumber_spinner.getValue()).intValue()) {
    239         has_changed = true;
    240                 require_restart = true;
     240            port_has_changed = true;
     241            has_changed = true;
     242            require_restart = true;
    241243                server.reconfigRequired();
    242244                portNum = ((Integer)portNumber_spinner.getValue()).intValue();
     
    295297        scriptReadWrite.writeOutFile(BaseServer.config_properties_file, newFileLines);
    296298
    297         server.reloadConfigProperties();
     299        server.reloadConfigProperties(port_has_changed);
    298300        server.reload(); // work out the URL again in case it has changed
    299301        if (require_restart){
Note: See TracChangeset for help on using the changeset viewer.