[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-API] problem in c binding xen_event_register / xen_string_set
Hello,
I have a problem using the xen-api c bindings. I want to register some classes
to deliver events.
If I call xen_event_register(session, stringset), I get a "Error: 2
TRANSPORT_FAULT 52", if stringset only contains one class. If the string set
contains two classes, it seems that only the first class is taken into
account. I think the error is in the c binding, because using the python
interface it works fine.
I seems to be a common problem passing xen_string_set objects to xend and not
a special one of xen_event_register.
This is my c code:
xen_string_set *s = xen_string_set_alloc(2);
s->contents[0] = xen_strdup_("VIF");
s->contents[1] = xen_strdup_("VBD");
X_C(xen_event_register(session, s));
xen_string_set_free(s);
Here is the XML-Output of the second try:
---Data to server: -----------------------
<?xml version="1.0"?>
<methodCall>
<methodName>event.register</methodName>
<params>
<param>
<value>
<string>1c66cafd-9b71-67ea-5cf6-c0a878e9e3be</string>
</value>
</param>
<param>
<value>
<struct> <-- is this correct; I tought this has to be the tag <array> ?
<param>
<value>
<string>VIF</string>
</value>
</param>
<param>
<value>
<string>VBD</string>
</value>
</param>
</struct>
</value>
</param>
</params>
</methodCall>
---Result from server -----------------------
<?xml version='1.0'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>Status</name>
<value>
<string>Success</string>
</value>
</member>
<member>
<name>Value</name>
<value>
<string></string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
Best Regards,
Lutz Dube
_______________________________________________ xen-api mailing list xen-api@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |