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.
if (!peer.isInterested())
{
if (_log.shouldLog(Log.INFO))
if (_log.shouldLog(Log.DEBUG))
_log.debug("Choke uninterested peer: " + peer);
peer.setChoking(true);
uploaders--;
@ -144,7 +144,7 @@ class PeerCheckerTask implements Runnable
}
else if (overBWLimitChoke)
{
if (_log.shouldLog(Log.INFO))
if (_log.shouldLog(Log.DEBUG))
_log.debug("BW limit (" + upload + "/" + uploaded + "), choke peer: " + peer);
peer.setChoking(true);
uploaders--;

View File

@ -249,8 +249,8 @@ public class Snark
private TrackerClient trackerclient;
private String rootDataDir = ".";
private final CompleteListener completeListener;
private boolean stopped;
private boolean starting;
private volatile boolean stopped;
private volatile boolean starting;
private byte[] id;
private byte[] infoHash;
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("<script src=\"/js/ajax.js\" type=\"text/javascript\"></script>\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 initAjax() { setTimeout(requestAjax1, " + (delay*1000) +"); }\n" +
"</script>\n");

View File

@ -22,7 +22,7 @@
<link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
<% 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()%>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" />
<% 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()%>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" />
<% 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()%>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" />
<% 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()%>i2ptunnel.css" rel="stylesheet" type="text/css" />
<% }

View File

@ -748,12 +748,13 @@ public class SummaryHelper extends HelperBase {
public List<String> getSummaryBarSections(String page) {
String config = "";
if ("home".equals(page))
if ("home".equals(page)) {
config = _context.getProperty(PROP_SUMMARYBAR + page, DEFAULT_MINIMAL);
else
config = _context.getProperty(PROP_SUMMARYBAR + page, null);
} else {
config = _context.getProperty(PROP_SUMMARYBAR + page);
if (config == null)
config = _context.getProperty(PROP_SUMMARYBAR + "default", DEFAULT_FULL);
}
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();
/** 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 */
protected boolean _closing;
protected volatile boolean _closing;
/** have we received the current date from the router yet? */
private boolean _dateReceived;
@ -121,7 +121,7 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa
private final Object _dateReceivedLock = new Object();
/** whether the session connection is in the process of being opened */
protected boolean _opening;
protected volatile boolean _opening;
/** monitor for waiting until opened */
private final Object _openingWait = new Object();

View File

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

View File

@ -6,11 +6,11 @@ body {
color: #001;
font: 7.5pt "Lucida Sans Unicode","Bitstream Vera Sans",Verdana,Tahoma,Helvetica,sans-serif;
}
body.iframed {
background: transparent url('../../console/dark/images/transparent.gif') !important;
background: transparent url('../../console/dark/images/transparent.gif') !important;
margin: 6px 0 !important;
}
}
.snarkTitle {
font-size: 12pt;
@ -163,7 +163,7 @@ thead a, tfoot a {
text-shadow:1px 1px #550000;
}
thead {;
thead {
border-bottom: 1px solid #101;
}
@ -260,7 +260,7 @@ td:first-child {
text-align: center !important;
}
.snarkTorrentName {
.snarkTorrentName {
line-height: 100%;
text-shadow:1px 1px #550000;
padding: 2px 0 0;
@ -304,7 +304,7 @@ td:first-child {
}
.snarkTorrentStatus {
padding: 2px 2px 2px 0;
padding: 2px 2px 2px 0;
line-height: 100%;
}
@ -326,7 +326,7 @@ td:first-child {
.snarkTorrentRateUp, .snarkTorrentRateDown, .snarkTorrentDownloaded, .snarkTorrentUploaded {
font-size: 7.5pt;
font-weight: bold;
padding: 0 3px;
padding: 0 3px;
line-height: 100%;
}
@ -382,41 +382,41 @@ td:first-child {
font-style: italic;
color: #dd7 !important;
}
.snarkTorrentInfo img {
max-height: 16px !important;
margin: 1px 0 1px 2px !important;
}
.snarkTorrentInfo td {
text-align: left !important;
padding: 0 1px !important;
}
table.SnarkTorrentInfo {
margin-bottom: 3 !important;
background: #000;
}
table.SnarkDirInfo {
margin-top: -2px !important;
}
.snarkDirInfo thead img {
margin: 0 -1px 0 0 !important;
}
.SnarkDirInfo td, .SnarkDirInfo th {
min-width: 0px !important;
}
.SnarkDirInfo td:nth-child(n+1) {
}
.SnarkDirInfo .headerpriority {
text-align: center !important;
vertical-align: middle;
}
.snarkTorrentInfo img {
max-height: 16px !important;
margin: 1px 0 1px 2px !important;
}
.snarkTorrentInfo td {
text-align: left !important;
padding: 0 1px !important;
}
table.SnarkTorrentInfo {
margin-bottom: 3 !important;
background: #000;
}
table.SnarkDirInfo {
margin-top: -2px !important;
}
.snarkDirInfo thead img {
margin: 0 -1px 0 0 !important;
}
.SnarkDirInfo td, .SnarkDirInfo th {
min-width: 0px !important;
}
.SnarkDirInfo td:nth-child(n+1) {
}
.SnarkDirInfo .headerpriority {
text-align: center !important;
vertical-align: middle;
}
.choked {
color: #f00000 !important;
@ -652,7 +652,7 @@ textarea {
-moz-border-radius: 4px;
-khtml-border-radius: 4px;
border-radius: 4px;
border: 1px inset #000;
border: 1px inset #000;
font-size: 8pt;
}
@ -823,35 +823,35 @@ code {
padding: 1px 0 0px !important;
vertical-align: top;
}
.routerdown {
color: #ee9;
}
.trackerconfig {
text-align: left !important;
}
.trackerconfig th:nth-child(n+4), .trackerconfig th:nth-child(n+5), .trackerconfig td:nth-child(n+4), .trackerconfig td:nth-child(n+5) {
text-align: center !important;
}
.trackerconfig th, .trackerconfig td, .trackerconfig th:last-child, .trackerconfig td:last-child {
text-align: left !important;
}
.trackerconfig td:first-child {
text-align: right !important;
}
input.trackername {
width: 100px;
}
input.trackerhome {
width: 200px;
}
input.trackerannounce {
width: 230px;
}
.routerdown {
color: #ee9;
}
.trackerconfig {
text-align: left !important;
}
.trackerconfig th:nth-child(n+4), .trackerconfig th:nth-child(n+5), .trackerconfig td:nth-child(n+4), .trackerconfig td:nth-child(n+5) {
text-align: center !important;
}
.trackerconfig th, .trackerconfig td, .trackerconfig th:last-child, .trackerconfig td:last-child {
text-align: left !important;
}
.trackerconfig td:first-child {
text-align: right !important;
}
input.trackername {
width: 100px;
}
input.trackerhome {
width: 200px;
}
input.trackerannounce {
width: 230px;
}