[PATCH 05/11] ipaccess: more robust error handling in the accept patch

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
Thu Aug 23 07:07:51 UTC 2012


On Wed, Aug 22, 2012 at 05:04:47PM +0200, pablo at gnumonks.org wrote:
> From: Pablo Neira Ayuso <pablo at gnumonks.org>

> Better close the newly established TCP connection to force a
> re-establishment.

two things.

a.) I think you can do the cleanup/codesharing in more paths.

>  	ret = osmo_fd_register(bfd);
>  	if (ret < 0) {
>  		LOGP(DLINP, LOGL_ERROR, "could not register FD\n");
> -		close(bfd->fd);
> -		e1inp_line_put(line);
> -		return ret;
> +		goto err;
>  	}
>  
>  	/* Request ID. FIXME: request LOCATION, HW/SW VErsion, Unit Name, Serno */
>  	ret = ipaccess_send_id_req(bfd->fd);
> +	if (ret < 0) {
> +		LOGP(DLINP, LOGL_ERROR, "could not send ID REQ. Reason: %s\n",
> +			strerror(errno));
> +		goto err;
> +	}

the bfd  remains registered!


> +	if (ret < 0) {
> +		LOGP(DLINP, LOGL_ERROR, "could not send ID REQ. Reason: %s\n",
> +			strerror(errno));
> +		goto err;
> +	}

same bfd issue.




More information about the OpenBSC mailing list