mgcp-client: Call osmo_fd_unregister() before closing and changing bfd->fd
Change-Id: I95fbcc21a18cadd2c06608cc39b9fe8e12c8bccf
This commit is contained in:
parent
e1da8c9d2c
commit
747fbce4ce
|
@ -907,10 +907,10 @@ void mgcp_client_disconnect(struct mgcp_client *mgcp)
|
||||||
wq = &mgcp->wq;
|
wq = &mgcp->wq;
|
||||||
osmo_wqueue_clear(wq);
|
osmo_wqueue_clear(wq);
|
||||||
LOGPMGW(mgcp, LOGL_INFO, "MGCP association: %s -- closed!\n", osmo_sock_get_name2(wq->bfd.fd));
|
LOGPMGW(mgcp, LOGL_INFO, "MGCP association: %s -- closed!\n", osmo_sock_get_name2(wq->bfd.fd));
|
||||||
close(wq->bfd.fd);
|
|
||||||
wq->bfd.fd = -1;
|
|
||||||
if (osmo_fd_is_registered(&wq->bfd))
|
if (osmo_fd_is_registered(&wq->bfd))
|
||||||
osmo_fd_unregister(&wq->bfd);
|
osmo_fd_unregister(&wq->bfd);
|
||||||
|
close(wq->bfd.fd);
|
||||||
|
wq->bfd.fd = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the IP-Aaddress of the associated MGW as string.
|
/*! Get the IP-Aaddress of the associated MGW as string.
|
||||||
|
|
Loading…
Reference in New Issue