On Wed, Aug 22, 2012 at 05:04:47PM +0200, pablo(a)gnumonks.org wrote:
From: Pablo Neira Ayuso <pablo(a)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.