1
0
mirror of http://galexander.org/git/simplesshd.git synced 2024-12-28 00:48:07 +00:00

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

This commit is contained in:
Greg Alexander 2014-12-17 22:48:38 -05:00
parent 5df0610f5c
commit 8a1bc2c4e0
3 changed files with 4 additions and 5 deletions

1
NOTES
View File

@ -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

View File

@ -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_)) {

View File

@ -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");