From 27e14e7f360c9fd7b73e058cd1097b3ec9795f46 Mon Sep 17 00:00:00 2001
From: str4d <str4d@mail.i2p>
Date: Thu, 2 Feb 2012 03:06:34 +0000
Subject: [PATCH] Remember reachableBy selection

---
 apps/i2ptunnel/jsp/wizard.jsp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/apps/i2ptunnel/jsp/wizard.jsp b/apps/i2ptunnel/jsp/wizard.jsp
index 1fdb9f93cf..8879ee8bf5 100644
--- a/apps/i2ptunnel/jsp/wizard.jsp
+++ b/apps/i2ptunnel/jsp/wizard.jsp
@@ -226,11 +226,15 @@
                 </label>
                 <select id="reachableBy" name="reachableBy" title="IP for Client Access" class="selectbox">
               <%
+                    String clientInterface = request.getParameter("reachableBy");
+                    if ("null".equals(clientInterface)) {
+                      clientInterface = "127.0.0.1";
+                    }
                     for (String ifc : wizardBean.interfaceSet()) {
                         out.write("<option value=\"");
                         out.write(ifc);
                         out.write('\"');
-                        if (ifc.equals("127.0.0.1"))
+                        if (ifc.equals(clientInterface))
                             out.write(" selected=\"selected\"");
                         out.write('>');
                         out.write(ifc);
-- 
GitLab