Re: [nft PATCH v2 2/2] src: get rid of printf

2017-09-21 Thread Florian Westphal
Phil Sutter wrote: > On Thu, Sep 21, 2017 at 05:51:12PM +0200, Pablo Neira Ayuso wrote: > > On Thu, Sep 21, 2017 at 05:43:09PM +0200, Florian Westphal wrote: > > > Phil Sutter wrote: > > > > With the proposed implementation of nft_print(), this will be > > > > problematic: nft_run_cmd_from_buffer

Re: [nft PATCH v2 2/2] src: get rid of printf

2017-09-21 Thread Phil Sutter
Hi, On Thu, Sep 21, 2017 at 05:51:12PM +0200, Pablo Neira Ayuso wrote: > On Thu, Sep 21, 2017 at 05:43:09PM +0200, Florian Westphal wrote: > > Phil Sutter wrote: > > > With the proposed implementation of nft_print(), this will be > > > problematic: nft_run_cmd_from_buffer() waits for the command

Re: [nft PATCH v2 2/2] src: get rid of printf

2017-09-21 Thread Pablo Neira Ayuso
On Thu, Sep 21, 2017 at 05:43:09PM +0200, Florian Westphal wrote: > Phil Sutter wrote: > > With the proposed implementation of nft_print(), this will be > > problematic: nft_run_cmd_from_buffer() waits for the command to finish > > before printing all the output at once. This obviously breaks moni

Re: [nft PATCH v2 2/2] src: get rid of printf

2017-09-21 Thread Florian Westphal
Phil Sutter wrote: > With the proposed implementation of nft_print(), this will be > problematic: nft_run_cmd_from_buffer() waits for the command to finish > before printing all the output at once. This obviously breaks monitor > which runs endlessly. > > Maybe we should reference nft_print via a

Re: [nft PATCH v2 2/2] src: get rid of printf

2017-09-21 Thread Phil Sutter
Hi, On Mon, Sep 04, 2017 at 10:53:04PM +0200, Pablo Neira Ayuso wrote: > On Mon, Sep 04, 2017 at 10:43:48PM +0200, Pablo Neira Ayuso wrote: > > On Mon, Sep 04, 2017 at 09:55:58AM +0200, Eric Leblond wrote: > > > This patch introduces the nft_print function that has to be used > > > instead of prin

Re: [nft PATCH v2 2/2] src: get rid of printf

2017-09-05 Thread Pablo Neira Ayuso
On Mon, Sep 04, 2017 at 11:23:40PM +0200, Eric Leblond wrote: > Hi, > > On Mon, 2017-09-04 at 22:53 +0200, Pablo Neira Ayuso wrote: > > On Mon, Sep 04, 2017 at 10:43:48PM +0200, Pablo Neira Ayuso wrote: > > > On Mon, Sep 04, 2017 at 09:55:58AM +0200, Eric Leblond wrote: > > > > This patch introduc

Re: [nft PATCH v2 2/2] src: get rid of printf

2017-09-04 Thread Eric Leblond
Hi, On Mon, 2017-09-04 at 22:53 +0200, Pablo Neira Ayuso wrote: > On Mon, Sep 04, 2017 at 10:43:48PM +0200, Pablo Neira Ayuso wrote: > > On Mon, Sep 04, 2017 at 09:55:58AM +0200, Eric Leblond wrote: > > > This patch introduces the nft_print function that has to be used > > > instead of printf to o

Re: [nft PATCH v2 2/2] src: get rid of printf

2017-09-04 Thread Pablo Neira Ayuso
On Mon, Sep 04, 2017 at 10:43:48PM +0200, Pablo Neira Ayuso wrote: > On Mon, Sep 04, 2017 at 09:55:58AM +0200, Eric Leblond wrote: > > This patch introduces the nft_print function that has to be used > > instead of printf to output information that were previously send > > to stdout. This function

Re: [nft PATCH v2 2/2] src: get rid of printf

2017-09-04 Thread Pablo Neira Ayuso
On Mon, Sep 04, 2017 at 09:55:58AM +0200, Eric Leblond wrote: > This patch introduces the nft_print function that has to be used > instead of printf to output information that were previously send > to stdout. This function accumulate the output in a buffer that can > be fetched by the user with th

[nft PATCH v2 2/2] src: get rid of printf

2017-09-04 Thread Eric Leblond
This patch introduces the nft_print function that has to be used instead of printf to output information that were previously send to stdout. This function accumulate the output in a buffer that can be fetched by the user with the nft_ctx_get_output() function. This modification will allow the lib