diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-03-14 11:48:27 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-03-14 11:48:27 +0100 |
commit | 747fbce4ce58fd48ef769883c5087477ef2f16b4 (patch) | |
tree | b31ad821058096f6d607edf5fe31306e5b02f15e /src | |
parent | e1da8c9d2c954c9bd3316ebd356d1bf2881a8707 (diff) |
mgcp-client: Call osmo_fd_unregister() before closing and changing bfd->fd
Change-Id: I95fbcc21a18cadd2c06608cc39b9fe8e12c8bccf
Diffstat (limited to 'src')
-rw-r--r-- | src/libosmo-mgcp-client/mgcp_client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 81847eec0..4dd278f5b 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -907,10 +907,10 @@ void mgcp_client_disconnect(struct mgcp_client *mgcp) wq = &mgcp->wq; osmo_wqueue_clear(wq); 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)) osmo_fd_unregister(&wq->bfd); + close(wq->bfd.fd); + wq->bfd.fd = -1; } /*! Get the IP-Aaddress of the associated MGW as string. |