forked from I2P_Developers/i2p.i2p
* Addressbook: Disable unused wakeup via http
This commit is contained in:
@@ -42,8 +42,8 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
*/
|
*/
|
||||||
public class Servlet extends HttpServlet {
|
public class Servlet extends HttpServlet {
|
||||||
private DaemonThread thread;
|
private DaemonThread thread;
|
||||||
private String nonce;
|
//private String nonce;
|
||||||
private static final String PROP_NONCE = "addressbook.nonce";
|
//private static final String PROP_NONCE = "addressbook.nonce";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hack to allow susidns to kick the daemon when the subscription list changes.
|
* Hack to allow susidns to kick the daemon when the subscription list changes.
|
||||||
@@ -54,15 +54,15 @@ public class Servlet extends HttpServlet {
|
|||||||
*/
|
*/
|
||||||
public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||||
//System.err.println("Got request nonce = " + request.getParameter("nonce"));
|
//System.err.println("Got request nonce = " + request.getParameter("nonce"));
|
||||||
if (this.thread != null && request.getParameter("wakeup") != null &&
|
//if (this.thread != null && request.getParameter("wakeup") != null &&
|
||||||
this.nonce != null && this.nonce.equals(request.getParameter("nonce"))) {
|
// this.nonce != null && this.nonce.equals(request.getParameter("nonce"))) {
|
||||||
//System.err.println("Sending interrupt");
|
// //System.err.println("Sending interrupt");
|
||||||
this.thread.interrupt();
|
// this.thread.interrupt();
|
||||||
// no output
|
// // no output
|
||||||
} else {
|
//} else {
|
||||||
PrintWriter out = response.getWriter();
|
PrintWriter out = response.getWriter();
|
||||||
out.write("I2P addressbook OK");
|
out.write("I2P addressbook OK");
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
@@ -75,9 +75,9 @@ public class Servlet extends HttpServlet {
|
|||||||
} catch (ServletException exp) {
|
} catch (ServletException exp) {
|
||||||
System.err.println("Addressbook init exception: " + exp);
|
System.err.println("Addressbook init exception: " + exp);
|
||||||
}
|
}
|
||||||
this.nonce = "" + Math.abs((new Random()).nextLong());
|
//this.nonce = "" + Math.abs((new Random()).nextLong());
|
||||||
// put the nonce where susidns can get it
|
// put the nonce where susidns can get it
|
||||||
System.setProperty(PROP_NONCE, this.nonce);
|
//System.setProperty(PROP_NONCE, this.nonce);
|
||||||
String[] args = new String[1];
|
String[] args = new String[1];
|
||||||
args[0] = config.getInitParameter("home");
|
args[0] = config.getInitParameter("home");
|
||||||
this.thread = new DaemonThread(args);
|
this.thread = new DaemonThread(args);
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
2012-11-24 zzz
|
||||||
|
* Addressbook: Disable unused wakeup via http
|
||||||
|
|
||||||
|
2012-11-21 zzz
|
||||||
|
* Wrapper: Add armv6 files for Raspberry Pi
|
||||||
|
|
||||||
2012-11-21 kytv
|
2012-11-21 kytv
|
||||||
* Update Java Service Wrapper to v3.5.16.
|
* Update Java Service Wrapper to v3.5.16.
|
||||||
- Windows: Self-compiled with VS2010 in Windows 7. The icon has been
|
- Windows: Self-compiled with VS2010 in Windows 7. The icon has been
|
||||||
|
@@ -18,7 +18,7 @@ public class RouterVersion {
|
|||||||
/** deprecated */
|
/** deprecated */
|
||||||
public final static String ID = "Monotone";
|
public final static String ID = "Monotone";
|
||||||
public final static String VERSION = CoreVersion.VERSION;
|
public final static String VERSION = CoreVersion.VERSION;
|
||||||
public final static long BUILD = 10;
|
public final static long BUILD = 11;
|
||||||
|
|
||||||
/** for example "-test" */
|
/** for example "-test" */
|
||||||
public final static String EXTRA = "";
|
public final static String EXTRA = "";
|
||||||
|
Reference in New Issue
Block a user