Re: [Spice-devel] [PATCH spice-server 7/8] agent-msg-filter: Add some comments to AgentMsgFilter structure

2019-02-11 Thread Eduardo Lima (Etrunko)
On 2/11/19 11:20 AM, Frediano Ziglio wrote:
>> On 2/11/19 9:54 AM, Frediano Ziglio wrote:
>>> Signed-off-by: Frediano Ziglio 
>>> ---
>>>  server/agent-msg-filter.h | 7 +++
>>>  1 file changed, 7 insertions(+)
>>>
>>> diff --git a/server/agent-msg-filter.h b/server/agent-msg-filter.h
>>> index bd124eacb..5776afc1d 100644
>>> --- a/server/agent-msg-filter.h
>>> +++ b/server/agent-msg-filter.h
>>> @@ -33,11 +33,18 @@ typedef enum {
>>>  } AgentMsgFilterResult;
>>>  
>>>  typedef struct AgentMsgFilter {
>>> +// bytes of message we still need to read
>>>  int msg_data_to_read;
>>> +// status of current message, we need to store in case the same
>>> message is split into multiple
>>> +// chunks
>>>  AgentMsgFilterResult result;
>>>  gboolean copy_paste_enabled;
>>>  gboolean file_xfer_enabled;
>>> +// device should pass monitor information to reds instead of passing
>>> to agent,
>>> +// used for messages from the guest to the agent
>>>  gboolean use_client_monitors_config;
>>> +// discard all messages, used for example when device is disable to

s/disable/disabled

>>> discard
>>> +// pending data
>>>  gboolean discard_all;
>>>  } AgentMsgFilter;
>>>  
>>>
>>
>> Acked-by: Eduardo Lima (Etrunko) 
>>
>> Since it is a C file, what about changing the comment style to /* */
>> instead of //, as to keep it in sync with other comments in this same file?
>>
> 
> Still C89 style? I can change if you prefer, but "this is a C file" in 2019
> is a bit obsolete after 20 years since C99.
> 
> Would you prefer:
> 
> /* line one
>  * line two */
> 
> of
> 
> /* line one
>  * line two
>  */
> 
> ?
> 

Either is fine, and it doesn't really bother me to mix the styles, it is
just a matter of preference. If you want to keep them as is, fine too.


-- 
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etru...@redhat.com
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH spice-server 7/8] agent-msg-filter: Add some comments to AgentMsgFilter structure

2019-02-11 Thread Frediano Ziglio
> On 2/11/19 9:54 AM, Frediano Ziglio wrote:
> > Signed-off-by: Frediano Ziglio 
> > ---
> >  server/agent-msg-filter.h | 7 +++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/server/agent-msg-filter.h b/server/agent-msg-filter.h
> > index bd124eacb..5776afc1d 100644
> > --- a/server/agent-msg-filter.h
> > +++ b/server/agent-msg-filter.h
> > @@ -33,11 +33,18 @@ typedef enum {
> >  } AgentMsgFilterResult;
> >  
> >  typedef struct AgentMsgFilter {
> > +// bytes of message we still need to read
> >  int msg_data_to_read;
> > +// status of current message, we need to store in case the same
> > message is split into multiple
> > +// chunks
> >  AgentMsgFilterResult result;
> >  gboolean copy_paste_enabled;
> >  gboolean file_xfer_enabled;
> > +// device should pass monitor information to reds instead of passing
> > to agent,
> > +// used for messages from the guest to the agent
> >  gboolean use_client_monitors_config;
> > +// discard all messages, used for example when device is disable to
> > discard
> > +// pending data
> >  gboolean discard_all;
> >  } AgentMsgFilter;
> >  
> > 
> 
> Acked-by: Eduardo Lima (Etrunko) 
> 
> Since it is a C file, what about changing the comment style to /* */
> instead of //, as to keep it in sync with other comments in this same file?
> 

Still C89 style? I can change if you prefer, but "this is a C file" in 2019
is a bit obsolete after 20 years since C99.

Would you prefer:

/* line one
 * line two */

of

/* line one
 * line two
 */

?

Frediano
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH spice-server 7/8] agent-msg-filter: Add some comments to AgentMsgFilter structure

2019-02-11 Thread Eduardo Lima (Etrunko)
On 2/11/19 9:54 AM, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio 
> ---
>  server/agent-msg-filter.h | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/server/agent-msg-filter.h b/server/agent-msg-filter.h
> index bd124eacb..5776afc1d 100644
> --- a/server/agent-msg-filter.h
> +++ b/server/agent-msg-filter.h
> @@ -33,11 +33,18 @@ typedef enum {
>  } AgentMsgFilterResult;
>  
>  typedef struct AgentMsgFilter {
> +// bytes of message we still need to read
>  int msg_data_to_read;
> +// status of current message, we need to store in case the same message 
> is split into multiple
> +// chunks
>  AgentMsgFilterResult result;
>  gboolean copy_paste_enabled;
>  gboolean file_xfer_enabled;
> +// device should pass monitor information to reds instead of passing to 
> agent,
> +// used for messages from the guest to the agent
>  gboolean use_client_monitors_config;
> +// discard all messages, used for example when device is disable to 
> discard
> +// pending data
>  gboolean discard_all;
>  } AgentMsgFilter;
>  
> 

Acked-by: Eduardo Lima (Etrunko) 

Since it is a C file, what about changing the comment style to /* */
instead of //, as to keep it in sync with other comments in this same file?

-- 
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etru...@redhat.com
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel