made the JNI methods static because they didn't use this anyways

sigsegv_dump
Greg Alexander 9 years ago
parent 5df0610f5c
commit 8a1bc2c4e0

@ -72,7 +72,6 @@ it uses select(), I'm not sure how I would honor Thread.interrupt() or
whatever. It's not guaranteed to interrupt select(), and I'm not keen on
adding an arbitrary timeout/polling feature to it.
XXX - make start stop natives static
XXX - try without 0.0.0.0
XXX - implement start on boot

@ -114,7 +114,7 @@ from_java_string(jobject s)
JNIEXPORT void JNICALL
Java_org_galexander_sshd_SimpleSSHDService_start_1sshd(JNIEnv *env_,
jobject this,
jclass cl,
jint port, jobject jpath, jobject jshell, jobject jhome, jobject jextra)
{
pid_t pid;
@ -164,7 +164,7 @@ Java_org_galexander_sshd_SimpleSSHDService_start_1sshd(JNIEnv *env_,
}
JNIEXPORT void JNICALL
Java_org_galexander_sshd_SimpleSSHDService_stop_1sshd(JNIEnv *env_, jobject this)
Java_org_galexander_sshd_SimpleSSHDService_stop_1sshd(JNIEnv *env_, jclass cl)
{
pid_t pid;
if (!jni_init(env_)) {

@ -98,9 +98,9 @@ public class SimpleSSHDService extends Service {
} catch (Exception e) { /* *shrug* */ }
}
private native void start_sshd(int port, String path,
private static native void start_sshd(int port, String path,
String shell, String home, String extra);
private native void stop_sshd();
private static native void stop_sshd();
private static native int waitpid(int pid);
static {
System.loadLibrary("simplesshd-jni");

Loading…
Cancel
Save