[Swan-dev] [Swan-commit] Changes to ref refs/heads/master

Antony Antony antony at phenome.org
Mon Jul 9 15:50:23 UTC 2018

On Mon, Jul 09, 2018 at 09:45:47AM -0400, Andrew Cagney wrote:
> Just pass in a stack allocated lswlog

Andrew, do you mean like the usage in ikev2_spdb_struct.c ?

LSWBUF(remote_print_buf) {
                int matching_local_propnum = ikev2_process_proposals(...
	and BIG chunk of code inside the macro.

A while ago, I had a look at what LSWBUF(){} expands to.
As I recollect it expands to 4 or 7 levels nested for loops! and many without {}. It is bit a scary nested macro to nest a big chunks of code.

I like the direction of starter_errors_t instead of macro LSWBUF
And fewer logging function is probably a better approach. 

Hugh, how about time jumps? if confread wait on things like dns. When it dump the log what will be timestap of lines?

LSWBUF seems to have smarts for to handle time. Then time will not be montonus in the log. Time prefix becomes a bit tricky to handle with a buffer per transaction.


More information about the Swan-dev mailing list