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