- Fix another Mac class problem

- Change to RouterLaunch main so we get a wrapper.log
This commit is contained in:
zzz
2009-06-29 17:42:13 +00:00
parent 3fee5a3781
commit 7972c0c862
2 changed files with 4 additions and 2 deletions

View File

@ -12,6 +12,7 @@ import java.io.InputStream;
import java.io.IOException; import java.io.IOException;
import net.i2p.router.Router; import net.i2p.router.Router;
import net.i2p.router.RouterLaunch;
import net.i2p.router.web.ContextHelper; import net.i2p.router.web.ContextHelper;
// import net.i2p.util.NativeBigInteger; // import net.i2p.util.NativeBigInteger;
@ -45,7 +46,7 @@ public class I2PAndroid extends Activity
{ {
System.err.println("onStart called"); System.err.println("onStart called");
super.onStart(); super.onStart();
Router.main(null); RouterLaunch.main(null);
System.err.println("Router.main finished"); System.err.println("Router.main finished");
} }
@ -105,6 +106,7 @@ public class I2PAndroid extends Activity
// Set up the locations so Router and WorkingDir can find them // Set up the locations so Router and WorkingDir can find them
System.setProperty("i2p.dir.base", DIR); System.setProperty("i2p.dir.base", DIR);
System.setProperty("i2p.dir.config", DIR); System.setProperty("i2p.dir.config", DIR);
System.setProperty("wrapper.logfile", DIR + "/wrapper.log");
} }
private void copyResourceToFile(int resID, String f) { private void copyResourceToFile(int resID, String f) {

View File

@ -74,7 +74,7 @@ public class HMACGenerator {
if ((key == null) || (key.getData() == null) || (curData == null)) if ((key == null) || (key.getData() == null) || (curData == null))
throw new NullPointerException("Null arguments for HMAC"); throw new NullPointerException("Null arguments for HMAC");
Mac mac = acquire(); I2PHMac mac = acquire();
mac.init(key.getData()); mac.init(key.getData());
mac.update(curData, curOffset, curLength); mac.update(curData, curOffset, curLength);
byte rv[] = acquireTmp(); byte rv[] = acquireTmp();