[Spice-devel] [PATCH spice-protocol v3] agent: Add support for reporting on free space

Victor Toso victortoso at redhat.com
Wed May 31 11:30:53 UTC 2017


Hi,

On Wed, May 24, 2017 at 08:28:38AM +0200, Pavel Grunt wrote:
> On Sun, 2017-05-21 at 15:09 +0200, Jakub Janků wrote:
> > Agent can send VDAgentFileXferStatusMessage with result
> > VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE to indicate lack of free
> > space. This enables more detailed error reporting, so the user knows
> > why the file transfer has failed.
> > 
> > Add VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS to ensure detailed errors
> > are not sent to clients that do not support it. This can be used
> > with more file xfer errors in the future.
> > ---
> >  spice/vd_agent.h | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/spice/vd_agent.h b/spice/vd_agent.h
> > index 3b1f183..2a168d0 100644
> > --- a/spice/vd_agent.h
> > +++ b/spice/vd_agent.h
> > @@ -99,11 +99,19 @@ enum {
> >      VD_AGENT_FILE_XFER_STATUS_CANCELLED,
> >      VD_AGENT_FILE_XFER_STATUS_ERROR,
> >      VD_AGENT_FILE_XFER_STATUS_SUCCESS,
> > +    VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE,
> >  };
> >  
> >  typedef struct SPICE_ATTR_PACKED VDAgentFileXferStatusMessage {
> >     uint32_t id;
> >     uint32_t result;
> > +   /* Used to send additional data for detailed error messages
> > +    * to clients with VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS
> > capability.
> > +    * Type of data varies with the result:
> > +    * result : data type
> > +    * VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE : uint64_t
> > +    */
> > +   uint8_t data[0];
> >  } VDAgentFileXferStatusMessage;
> >  
> >  typedef struct SPICE_ATTR_PACKED VDAgentFileXferStartMessage {
> > @@ -248,6 +256,7 @@ enum {
> >      VD_AGENT_CAP_AUDIO_VOLUME_SYNC,
> >      VD_AGENT_CAP_MONITORS_CONFIG_POSITION,
> >      VD_AGENT_CAP_FILE_XFER_DISABLED,
> > +    VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS,
> >      VD_AGENT_END_CAP,
> >  };
> >  
> 
>
> Looks good to me, ack.

I'll be testing this with the recent patches and if all is good, I'll be
pushing the acked ones

Cheers,

>
> Thanks,
> Pavel
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170531/b3ff171f/attachment.sig>


More information about the Spice-devel mailing list