Changeset 9c96c07


Ignore:
Timestamp:
Nov 24, 2010 4:45:43 PM (10 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
838da76
Parents:
9053a86 (diff), 5f3834d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge of 'bbaea7567520aced60f19b571f63c11cbb3b1d76'

and 'e7bbb1ca66df6fb49b2f1fcb554e8077dd488fb2'

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Slackware/i2p-base/rc.i2p_def

    r9053a86 r9c96c07  
    55 # Check if router is up first!
    66 /bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory status )" > /dev/null
    7  if [ ! $? -eq 0 ] ; then {
     7 if [ $? -eq 0 ] ; then {
    88  # I2p is already running, so tell the user.
    99  echo "I2P is already running..."
  • apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java

    r9053a86 r9c96c07  
    5151    private static Map<String, Collection<Job>> pluginJobs = new ConcurrentHashMap<String, Collection<Job>>();
    5252    private static Map<String, ClassLoader> _clCache = new ConcurrentHashMap();
     53    private static Map<String, Collection<String>> pluginWars = new ConcurrentHashMap<String, Collection<String>>();
    5354
    5455    public PluginStarter(RouterContext ctx) {
     
    126127            String fileNames[] = webappDir.list(RouterConsoleRunner.WarFilenameFilter.instance());
    127128            if (fileNames != null) {
     129                if(!pluginWars.containsKey(appName))
     130                    pluginWars.put(appName, new ConcurrentHashSet<String>());
    128131                for (int i = 0; i < fileNames.length; i++) {
    129132                    try {
     
    140143                            String path = new File(webappDir, fileNames[i]).getCanonicalPath();
    141144                            WebAppStarter.startWebApp(ctx, server, warName, path);
     145                            pluginWars.get(appName).add(warName);
    142146                        }
    143147                    } catch (IOException ioe) {
     
    216220        Server server = WebAppStarter.getConsoleServer();
    217221        if (server != null) {
     222        /*
    218223            File consoleDir = new File(pluginDir, "console");
    219224            Properties props = RouterConsoleRunner.webAppProperties(consoleDir.getAbsolutePath());
     
    229234                }
    230235            }
     236        */
     237            Iterator <String> wars = pluginWars.get(appName).iterator();
     238            while (wars.hasNext()) {
     239                String warName = wars.next();
     240                WebAppStarter.stopWebApp(server, warName);
     241            }
     242            pluginWars.get(appName).clear();
    231243        }
    232244
     
    488500                    break;
    489501                }
     502        boolean isWarRunning = false;
     503        if(pluginWars.containsKey(pluginName)) {
     504            Iterator <String> it = pluginWars.get(pluginName).iterator();
     505            while(it.hasNext() && !isWarRunning) {
     506                String warName = it.next();
     507                if(WebAppStarter.isWebAppRunning(warName)) {
     508                    isWarRunning = true;
     509                }
     510            }
     511        }
    490512
    491513        if (log.shouldLog(Log.DEBUG))
    492             log.debug("plugin name = <" + pluginName + ">; threads running? " + isClientThreadRunning(pluginName) + "; webapp runing? " + WebAppStarter.isWebAppRunning(pluginName) + "; jobs running? " + isJobRunning);
    493         return isClientThreadRunning(pluginName) || WebAppStarter.isWebAppRunning(pluginName) || isJobRunning;
     514            log.debug("plugin name = <" + pluginName + ">; threads running? " + isClientThreadRunning(pluginName) + "; webapp runing? " + isWarRunning + "; jobs running? " + isJobRunning);
     515        return isClientThreadRunning(pluginName) || isWarRunning || isJobRunning;
     516        //
     517        //if (log.shouldLog(Log.DEBUG))
     518        //    log.debug("plugin name = <" + pluginName + ">; threads running? " + isClientThreadRunning(pluginName) + "; webapp runing? " + WebAppStarter.isWebAppRunning(pluginName) + "; jobs running? " + isJobRunning);
     519        //return isClientThreadRunning(pluginName) || WebAppStarter.isWebAppRunning(pluginName) || isJobRunning;
     520        //
    494521    }
    495522   
  • history.txt

    r9053a86 r9c96c07  
     12010-11-24 sponge
     2    * Slackware, fix rc.i2p, bad logic.
     3
     42010-11-24 sponge
     5    * Plugin: ticket 104 Fix webapp isRunning to check ALL webapps.
     6      The only defecency is that if one is running, that it considers the
     7      entire pliugin to be running. I'm not sure if that is a good thing
     8      or a bad thing, but the other code checks threads that way.
     9
    1102010-11-22 zzz
    211    * Addressbook: Fix rename error on Windows (tkt 323 - thanks RN!)
  • router/java/src/net/i2p/router/RouterVersion.java

    r9053a86 r9c96c07  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 4;
     21    public final static long BUILD = 5;
    2222
    2323    /** for example "-test" */
Note: See TracChangeset for help on using the changeset viewer.