Re: Add a new api, get this error.gnutls_record_recv: A TLS packet with unexpected length was received.

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

 




Oh, thanks.
  I have found that if my return type is  remote_nonnull_string, the error will be happen, 
but if the return type is int, it works ok.

2012/2/14 Eric Blake <eblake@xxxxxxxxxx>
On 02/12/2012 11:26 AM, 灵矫 wrote:

[please don't top-post on technical lists]

> Sorry,
>      I just add the function prototypes in libvirt.h libvirt.in<http://libvirt.in>,   implement it in libvirt.c and call a hypervisor function in qemu_drivier.h.
> basicly no other codes.

It's easier to review your code for errors if you post the actual
patches you have written so far.

>
> 2012/2/13 chang liu <lingjiao.lc@xxxxxxxxx<mailto:lingjiao.lc@xxxxxxxxx>>
> hi all,
>    Sorry to disturb you.
>    I wanna to add a new api to get some sheepdog cluster info, but I has get this error, I don't know how to do.
>
>    I have add a function to daemon/remote.c that call the libvirt.c 's  api, remoteDispatchConnectExecuteCommand, and here i get the return value.
>
>         struct remote_connect_execute_command_ret {
>                remote_nonnull_string ret_val;
>         };
>         typedef struct remote_connect_execute_command_ret remote_connect_execute_command_ret;
>
>
>         static int
>         remoteDispatchConnectExecuteCommand (struct qemud_server *server ATTRIBUTE_UNUSED,
>                              struct qemud_client *client ATTRIBUTE_UNUSED,
>                              virConnectPtr conn,
>                              remote_message_header *hdr ATTRIBUTE_UNUSED,
>                              remote_error *rerr,
>                              remote_connect_execute_command_args *args,
>                              remote_connect_execute_command_ret *ret)

If you're lucky, your new API won't need you to write any code in
daemon/remote.c, but can instead be autogenerated as part of adding your
new API to src/remote/remote_protocol.x.  But it's hard to see what you
might be doing wrong without seeing your full patch.

--
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


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

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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]