Re: [libvirt] Java binding blockStats bug (libvirt-java-0.2.1)

2009-05-11 Thread Daniel Veillard
On Sun, May 10, 2009 at 02:06:54AM +0300, Zvi Dubitzky wrote:
 running blcokStats() with Java binding  (libvirt-java-0.2.1 ) I get an 
 exception
 
 Inspecting the src/jni/org_libvirt_Domain.c  is see the following lines of 
 code :
[...]
 The bold line should be replaced by :
 
   jclass stats_cls=(*env)-FindClass(env, org/libvirt/DomainBlockStats)
 
 as we deal here with blockStats and not network interface Stats !

  Ah, right, good catch ! Applied and commited,

   thanks !

Daniel

-- 
Daniel Veillard  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] Java binding blockStats bug (libvirt-java-0.2.1)

2009-05-09 Thread Zvi Dubitzky
running blcokStats() with Java binding  (libvirt-java-0.2.1 ) I get an 
exception

Inspecting the src/jni/org_libvirt_Domain.c  is see the following lines of 
code :


JNIEXPORT jobject JNICALL Java_org_libvirt_Domain__1blockStats
  (JNIEnv *env, jobject obj, jlong VDP, jstring j_path){
struct  _virDomainBlockStats stats;
jobject j_stats;
jclass stats_cls=(*env)-FindClass(env, 
org/libvirt/DomainInterfaceStats);
const char *path = (*env)-GetStringUTFChars(env, j_path, NULL);

if(virDomainBlockStats((virDomainPtr)VDP, path, stats, 
sizeof(struct  _virDomainBlockStats))0){
(*env)-ReleaseStringUTFChars(env, j_path, path);
return NULL;
}
.
.
.

The bold line should be replaced by :

  jclass stats_cls=(*env)-FindClass(env, org/libvirt/DomainBlockStats)

as we deal here with blockStats and not network interface Stats !


thanks

Zvi Dubitzky 
Virtualization and System Architecture   Email:d...@il.ibm.com
IBM Haifa Research LaboratoryPhone: +972-4-8296182
Haifa, 31905, ISRAEL 


--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list