[PATCH 2/3] abis: skip e1_input nesting if empty

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Holger Hans Peter Freyther holger at freyther.de
Tue May 3 21:14:41 UTC 2011


On 05/03/2011 10:44 PM, pablo at gnumonks.org wrote:

> -	vty_out(vty, "e1_input%s", VTY_NEWLINE);
> +	bool heading = false;

what about

	if (llist_empty(&e1in..)
		return;


>  
>  	llist_for_each_entry(line, &e1inp_line_list, list) {
> +		if (!heading) {
> +			vty_out(vty, "e1_input%s", VTY_NEWLINE);
> +			heading = true;
> +		}
>  		vty_out(vty, " e1_line %u driver %s%s", line->num,
>  			line->driver->name, VTY_NEWLINE);
>  	}





More information about the OpenBSC mailing list