fixes after review

This commit is contained in:
zzz
2012-07-30 13:15:58 +00:00
parent 78b1922dd7
commit 7ecb90640c
11 changed files with 92 additions and 91 deletions

View File

@ -133,7 +133,7 @@ class PeerCheckerTask implements Runnable
// Check if it still wants pieces from us. // Check if it still wants pieces from us.
if (!peer.isInterested()) if (!peer.isInterested())
{ {
if (_log.shouldLog(Log.INFO)) if (_log.shouldLog(Log.DEBUG))
_log.debug("Choke uninterested peer: " + peer); _log.debug("Choke uninterested peer: " + peer);
peer.setChoking(true); peer.setChoking(true);
uploaders--; uploaders--;
@ -144,7 +144,7 @@ class PeerCheckerTask implements Runnable
} }
else if (overBWLimitChoke) else if (overBWLimitChoke)
{ {
if (_log.shouldLog(Log.INFO)) if (_log.shouldLog(Log.DEBUG))
_log.debug("BW limit (" + upload + "/" + uploaded + "), choke peer: " + peer); _log.debug("BW limit (" + upload + "/" + uploaded + "), choke peer: " + peer);
peer.setChoking(true); peer.setChoking(true);
uploaders--; uploaders--;

View File

@ -249,8 +249,8 @@ public class Snark
private TrackerClient trackerclient; private TrackerClient trackerclient;
private String rootDataDir = "."; private String rootDataDir = ".";
private final CompleteListener completeListener; private final CompleteListener completeListener;
private boolean stopped; private volatile boolean stopped;
private boolean starting; private volatile boolean starting;
private byte[] id; private byte[] id;
private byte[] infoHash; private byte[] infoHash;
private String additionalTrackerURL; private String additionalTrackerURL;

View File

@ -232,7 +232,7 @@ public class I2PSnarkServlet extends DefaultServlet {
//out.write("<meta http-equiv=\"refresh\" content=\"" + delay + ";/i2psnark/" + peerString + "\">\n"); //out.write("<meta http-equiv=\"refresh\" content=\"" + delay + ";/i2psnark/" + peerString + "\">\n");
out.write("<script src=\"/js/ajax.js\" type=\"text/javascript\"></script>\n" + out.write("<script src=\"/js/ajax.js\" type=\"text/javascript\"></script>\n" +
"<script type=\"text/javascript\">\n" + "<script type=\"text/javascript\">\n" +
"var failMessage = \"<div class=\\\"routerdown\\\"><b>" + _("Router is down") + "<\\/b></div>\";\n" + "var failMessage = \"<div class=\\\"routerdown\\\"><b>" + _("Router is down") + "<\\/b><\\/div>\";\n" +
"function requestAjax1() { ajax(\"/i2psnark/.ajax/xhr1.html" + peerString + "\", \"mainsection\", " + (delay*1000) + "); }\n" + "function requestAjax1() { ajax(\"/i2psnark/.ajax/xhr1.html" + peerString + "\", \"mainsection\", " + (delay*1000) + "); }\n" +
"function initAjax() { setTimeout(requestAjax1, " + (delay*1000) +"); }\n" + "function initAjax() { setTimeout(requestAjax1, " + (delay*1000) +"); }\n" +
"</script>\n"); "</script>\n");

View File

@ -22,7 +22,7 @@
<link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" /> <link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
<% if (editBean.allowCSS()) { <% if (editBean.allowCSS()) {
%><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico"> %><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" />
<link href="<%=editBean.getTheme()%>default.css" rel="stylesheet" type="text/css" /> <link href="<%=editBean.getTheme()%>default.css" rel="stylesheet" type="text/css" />
<link href="<%=editBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" /> <link href="<%=editBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" />
<% } <% }

View File

@ -22,7 +22,7 @@
<link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" /> <link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
<% if (editBean.allowCSS()) { <% if (editBean.allowCSS()) {
%><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico"> %><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" />
<link href="<%=editBean.getTheme()%>default.css" rel="stylesheet" type="text/css" /> <link href="<%=editBean.getTheme()%>default.css" rel="stylesheet" type="text/css" />
<link href="<%=editBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" /> <link href="<%=editBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" />
<% } <% }

View File

@ -24,7 +24,7 @@
<link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" /> <link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
<% if (indexBean.allowCSS()) { <% if (indexBean.allowCSS()) {
%><link rel="icon" href="<%=indexBean.getTheme()%>images/favicon.ico"> %><link rel="icon" href="<%=indexBean.getTheme()%>images/favicon.ico" />
<link href="<%=indexBean.getTheme()%>default.css" rel="stylesheet" type="text/css" /> <link href="<%=indexBean.getTheme()%>default.css" rel="stylesheet" type="text/css" />
<link href="<%=indexBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" /> <link href="<%=indexBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" />
<% } <% }

View File

@ -57,7 +57,7 @@
<link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" /> <link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
<% if (editBean.allowCSS()) { <% if (editBean.allowCSS()) {
%><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico"> %><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" />
<link href="<%=editBean.getTheme()%>default.css" rel="stylesheet" type="text/css" /> <link href="<%=editBean.getTheme()%>default.css" rel="stylesheet" type="text/css" />
<link href="<%=editBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" /> <link href="<%=editBean.getTheme()%>i2ptunnel.css" rel="stylesheet" type="text/css" />
<% } <% }

View File

@ -748,12 +748,13 @@ public class SummaryHelper extends HelperBase {
public List<String> getSummaryBarSections(String page) { public List<String> getSummaryBarSections(String page) {
String config = ""; String config = "";
if ("home".equals(page)) if ("home".equals(page)) {
config = _context.getProperty(PROP_SUMMARYBAR + page, DEFAULT_MINIMAL); config = _context.getProperty(PROP_SUMMARYBAR + page, DEFAULT_MINIMAL);
else } else {
config = _context.getProperty(PROP_SUMMARYBAR + page, null); config = _context.getProperty(PROP_SUMMARYBAR + page);
if (config == null) if (config == null)
config = _context.getProperty(PROP_SUMMARYBAR + "default", DEFAULT_FULL); config = _context.getProperty(PROP_SUMMARYBAR + "default", DEFAULT_FULL);
}
return Arrays.asList(config.split("" + S)); return Arrays.asList(config.split("" + S));
} }

View File

@ -110,10 +110,10 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa
private final Object _leaseSetWait = new Object(); private final Object _leaseSetWait = new Object();
/** whether the session connection has already been closed (or not yet opened) */ /** whether the session connection has already been closed (or not yet opened) */
protected boolean _closed; protected volatile boolean _closed;
/** whether the session connection is in the process of being closed */ /** whether the session connection is in the process of being closed */
protected boolean _closing; protected volatile boolean _closing;
/** have we received the current date from the router yet? */ /** have we received the current date from the router yet? */
private boolean _dateReceived; private boolean _dateReceived;
@ -121,7 +121,7 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa
private final Object _dateReceivedLock = new Object(); private final Object _dateReceivedLock = new Object();
/** whether the session connection is in the process of being opened */ /** whether the session connection is in the process of being opened */
protected boolean _opening; protected volatile boolean _opening;
/** monitor for waiting until opened */ /** monitor for waiting until opened */
private final Object _openingWait = new Object(); private final Object _openingWait = new Object();

View File

@ -760,7 +760,7 @@ div.configsection a:hover {
text-decoration: none; text-decoration: none;
} }
code {; code {
font-size: 8pt; font-size: 8pt;
color: #009; color: #009;
padding: 0 2px; padding: 0 2px;

View File

@ -163,7 +163,7 @@ thead a, tfoot a {
text-shadow:1px 1px #550000; text-shadow:1px 1px #550000;
} }
thead {; thead {
border-bottom: 1px solid #101; border-bottom: 1px solid #101;
} }