Hey, On Thu, Mar 19, 2015 at 04:50:42AM -0400, Pavel Grunt wrote: > > > > > So, did you investigate whether it would be possible to modify > > libgovirt / librest to return a 'CANCELLED' error status (or similar) > > from ovirt_proxy_fetch_api() so that we don't need to track this > > ourselves with an extra struct? That seems like a cleaner long-term > > solution. > > > > But this patch is fine for the current behavior. ACK. > > > > Jonathon > > > > I should have mentioned in the patch: > > According to [1] the "authenticate" signal returns FALSE when credentials are not set, returns TRUE when they are set, I don't see a way how to "forward" info why they weren't set. > However the "CANCELLED" error exists in librest [2] so maybe implementing new signal / api in librest and handling REST_PROXY_ERROR_CANCELLED in libgovirt is possible solution > > [1] https://developer.gnome.org/rest/0.7/RestProxy.html#RestProxy-authenticate > [2] https://developer.gnome.org/rest/0.7/RestProxy.html#REST-PROXY-ERROR:CAPS librest merely wraps https://developer.gnome.org/libsoup/stable/SoupSession.html#SoupSession-authenticate It seems with libsoup, one would be able to use soup_session_cancel_message() from the authenticate callback to return an error code: https://developer.gnome.org/libsoup/stable/SoupSession.html#soup-session-cancel-message Christophe
Attachment:
pgpXnxAzXJAyz.pgp
Description: PGP signature
_______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list