[PATCH] Mail: ngx_mail_session_t 'protocol' field resize

Maxim Dounin mdounin at mdounin.ru
Mon Feb 10 10:09:08 UTC 2014


Hello!

On Mon, Feb 10, 2014 at 10:02:51AM +0100, Filipe da Silva wrote:

> # HG changeset patch
> # User Filipe da Silva <fdasilvayy at gmail.com>
> # Date 1389727364 -3600
> #      Tue Jan 14 20:22:44 2014 +0100
> # Node ID 9e519ec4328ab9b8dd0639e1f9321f62f9bce287
> # Parent  188481078faf4b2bff88a4086d6d509730f90099
> Mail: ngx_mail_session_t 'protocol' field resize
> 
> As possible values are NGX_MAIL_*_PROTOCOL(0,1,2)
> 
> diff -r 188481078faf -r 9e519ec4328a src/mail/ngx_mail.h
> --- a/src/mail/ngx_mail.h	Mon Feb 03 14:17:17 2014 -0800
> +++ b/src/mail/ngx_mail.h	Tue Jan 14 20:22:44 2014 +0100
> @@ -209,7 +209,7 @@ typedef struct {
>  
>      ngx_uint_t              mail_state;
>  
> -    unsigned                protocol:3;
> +    unsigned                protocol:2;
>      unsigned                blocked:1;
>      unsigned                quit:1;
>      unsigned                quoted:1;

No, please.

In theory, more protocols can be added by addon modules.  And 
there is no real difference in practice as there is padding after 
bit fields anyway.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list