mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-05 06:57:00 +02:00
netDB and certificates in internal storage
This commit is contained in:
parent
d41fabbc9f
commit
81d7a832c0
6 changed files with 59 additions and 24 deletions
|
@ -126,12 +126,11 @@ namespace android
|
|||
}
|
||||
*/
|
||||
static DaemonAndroidImpl daemon;
|
||||
static char* argv[1]={strdup("tmp")};
|
||||
/**
|
||||
* returns error details if failed
|
||||
* returns "ok" if daemon initialized and started okay
|
||||
*/
|
||||
std::string start(/*int argc, char* argv[]*/)
|
||||
std::string start(int argc, char* argv[])
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -139,7 +138,7 @@ namespace android
|
|||
|
||||
{
|
||||
//Log.d(TAG"Initialising the daemon...");
|
||||
bool daemonInitSuccess = daemon.init(1,argv);
|
||||
bool daemonInitSuccess = daemon.init(argc,argv);
|
||||
if(!daemonInitSuccess)
|
||||
{
|
||||
//QMessageBox::critical(0, "Error", "Daemon init failed");
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace android
|
|||
* returns "ok" if daemon init failed
|
||||
* returns errinfo if daemon initialized and started okay
|
||||
*/
|
||||
std::string start();
|
||||
std::string start(int argc, char* argv[]);
|
||||
|
||||
// stops the daemon
|
||||
void stop();
|
||||
|
|
|
@ -45,7 +45,16 @@ JNIEXPORT jstring JNICALL Java_org_purplei2p_i2pd_I2PD_1JNI_getABICompiledWith
|
|||
|
||||
JNIEXPORT jstring JNICALL Java_org_purplei2p_i2pd_I2PD_1JNI_startDaemon
|
||||
(JNIEnv * env, jclass clazz) {
|
||||
return env->NewStringUTF(i2p::android::start().c_str());
|
||||
|
||||
int argc=5;
|
||||
static char* argv[]={
|
||||
"i2pd", "--service", "--daemon",
|
||||
"--conf=/sdcard/i2pd/i2pd.conf",
|
||||
"--tunconf=/sdcard/i2pd/tunnels.conf",
|
||||
"--datadir=/data/data/org.purplei2p.i2pd/app_data/"
|
||||
};
|
||||
|
||||
return env->NewStringUTF(i2p::android::start(argc,argv).c_str());
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_purplei2p_i2pd_I2PD_1JNI_stopDaemon
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue