mgcp_network: Unregister osmo_fd before closing fd
Change-Id: Ib937e56be62327f52d9cf03a07d7620080356ee8
This commit is contained in:
parent
544016d8e6
commit
6c303664f5
|
@ -1676,14 +1676,14 @@ int mgcp_bind_net_rtp_port(struct mgcp_endpoint *endp, int rtp_port,
|
|||
void mgcp_free_rtp_port(struct mgcp_rtp_end *end)
|
||||
{
|
||||
if (end->rtp.fd != -1) {
|
||||
osmo_fd_unregister(&end->rtp);
|
||||
close(end->rtp.fd);
|
||||
end->rtp.fd = -1;
|
||||
osmo_fd_unregister(&end->rtp);
|
||||
}
|
||||
|
||||
if (end->rtcp.fd != -1) {
|
||||
osmo_fd_unregister(&end->rtcp);
|
||||
close(end->rtcp.fd);
|
||||
end->rtcp.fd = -1;
|
||||
osmo_fd_unregister(&end->rtcp);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue