[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] problem in c binding xen_event_register / xen_string_set


  • To: "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx>
  • From: "Dube, Lutz" <Lutz.Dube@xxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 18 Dec 2007 12:37:20 +0100
  • Accept-language: de-DE, en-US
  • Acceptlanguage: de-DE, en-US
  • Delivery-date: Tue, 18 Dec 2007 03:47:34 -0800
  • Domainkey-signature: s=s768; d=fujitsu-siemens.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:Received:Received: From:To:Date:Subject:Thread-Topic:Thread-Index: Message-ID:Accept-Language:Content-Language: X-MS-Has-Attach:X-MS-TNEF-Correlator:acceptlanguage: Content-Type:MIME-Version; b=yLmVGn36udhD8q6tjvzMKlS+yBEp7TkKP4owz8YGQ0taM7pesmT05 3FnVrHpVFXKjHPu3WzvpCcEfGzGkCqVwQ7xabxCE8eVK3yxwGvkX+ 0UUSEFjKNMGpUbFpwhI8Hy;
  • List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
  • Thread-index: AchBalmi/pImWObYSk+E0kQneLgm0A==
  • Thread-topic: 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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.