I've attached the patch to fix the refactored ConnectAuth jni code. ("javap -private -s" is your friend when doing JNI stuff)
I had to do a "cp README README.in" in the cvs downloaded code, bacuase autogen.sh refused to run otherwise. Maybe it's missing from CVS?
I am still targeting to add the full storage functionality in early August, when I'm back from vacation.
Thanks for all the refactoring work. regards István Daniel Veillard wrote:
Okay I made a new release with the API renaming changes we discussed previously. It is available at the usual place: ftp://libvirt.org/libvirt/java/ I also built it for Fedora-9, it should be available for testing there soon too. There is still a few issues, for example I get an out of bound exception error when running the test.java, looks like a pointer/integer conversion error when using the authentification callbacks (I realize i may have left a couple of debug statement in the JNI C file there). In general I'm not sure the jlong VDP cast trick will always work, it looks a bit unsafe but that's an implementation detail it should not affect the API. I tried to incorporate some solaris fixes from John Levon, but i can't garantee it's all fixed (well not the warnings due to the VDP cast) So this is a good version for testing, feedback, patches and expertise much welcome, as I'm sort of a Java newbie ! Daniel
? README.in ? src/jni/org_libvirt_Connect.h ? src/jni/org_libvirt_Domain.h ? src/jni/org_libvirt_Domain_CreateFlags.h ? src/jni/org_libvirt_Domain_MigrateFlags.h ? src/jni/org_libvirt_Domain_XMLFlags.h ? src/jni/org_libvirt_Network.h Index: src/jni/ConnectAuthCallbackBridge.c =================================================================== RCS file: /data/cvs/libvirt-java/src/jni/ConnectAuthCallbackBridge.c,v retrieving revision 1.1 diff -u -p -r1.1 ConnectAuthCallbackBridge.c --- src/jni/ConnectAuthCallbackBridge.c 18 Jul 2008 14:37:21 -0000 1.1 +++ src/jni/ConnectAuthCallbackBridge.c 20 Jul 2008 10:21:15 -0000 @@ -15,7 +15,7 @@ int ConnectAuthCallbackBridge(virConnect jmethodID j_auth_cb_id=(*env)->GetMethodID(env, (*env)->GetObjectClass(env, j_auth), "callback", "([Lorg/libvirt/ConnectAuth$Credential;)I"); jclass j_cred_cls = (*env)->FindClass(env, "org/libvirt/ConnectAuth$Credential"); - jmethodID j_cred_constructor = (*env)->GetMethodID(env, j_cred_cls, "<init>", "(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); + jmethodID j_cred_constructor = (*env)->GetMethodID(env, j_cred_cls, "<init>", "(Lorg/libvirt/ConnectAuth;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); jfieldID j_cred_result_id = (*env)->GetFieldID(env, j_cred_cls, "result", "Ljava/lang/String;"); jobjectArray j_credArray = (*env)->NewObjectArray(env, ncred, j_cred_cls, NULL); @@ -27,6 +27,7 @@ int ConnectAuthCallbackBridge(virConnect j_cred=(*env)->NewObject(env, j_cred_cls, j_cred_constructor, + j_auth, cred[c].type, (*env)->NewStringUTF(env, cred[c].prompt), (*env)->NewStringUTF(env, cred[c].challenge),
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list