Re: [PATCH 4/5] pgsql: only disable key if it starts with underscore

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

 



On Wed, Aug 01, 2012 at 11:27:15PM +0200, Eric Leblond wrote:
> ulogd2 was magically making inactive the first key of description
> table. This patch improves this system by only doing so when
> the key start with an undescore. This way, system like nfacct which
> do not have a primary key can be implemented easily.

Applied with minor glitch, thanks.

> ---
>  output/pgsql/ulogd_output_PGSQL.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/output/pgsql/ulogd_output_PGSQL.c b/output/pgsql/ulogd_output_PGSQL.c
> index 9529b1c..44600b0 100644
> --- a/output/pgsql/ulogd_output_PGSQL.c
> +++ b/output/pgsql/ulogd_output_PGSQL.c
> @@ -195,8 +195,10 @@ static int get_columns_pgsql(struct ulogd_pluginstance *upi)
>  		strncpy(upi->input.keys[i].name, buf, ULOGD_MAX_KEYLEN);
>  	}
>  
> -	/* ID is a sequence */
> -	upi->input.keys[0].flags |= ULOGD_KEYF_INACTIVE;
> +	/* ID (starting by '.') is a sequence */
> +	if (upi->input.keys[0].name[0] == '.') {
> +	    upi->input.keys[0].flags |= ULOGD_KEYF_INACTIVE;
> +	}

No need for brackets here. Also fixed indentation.

>  
>  	PQclear(pi->pgres);
>  	return 0;
> -- 
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux