[asterisk-commits] chan mgcp: Don't call close on fd -1. (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jul 2 07:50:54 CDT 2015
Joshua Colp has submitted this change and it was merged.
Change subject: chan_mgcp: Don't call close on fd -1.
......................................................................
chan_mgcp: Don't call close on fd -1.
ASTERISK-25220 #close
Change-Id: Ic48f3a82f51ada87f2fb0e016c9efe0ad56f1ee3
---
M channels/chan_mgcp.c
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
Matt Jordan: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Verified
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index 16d3c65..d9e182c 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -5007,7 +5007,9 @@
return -1;
}
- close(mgcpsock);
+ if (mgcpsock > -1) {
+ close(mgcpsock);
+ }
ast_rtp_glue_unregister(&mgcp_rtp_glue);
ast_cli_unregister_multiple(cli_mgcp, sizeof(cli_mgcp) / sizeof(struct ast_cli_entry));
ast_sched_context_destroy(sched);
--
To view, visit https://gerrit.asterisk.org/770
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic48f3a82f51ada87f2fb0e016c9efe0ad56f1ee3
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Walter Doekes <walter+asterisk at wjd.nu>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
More information about the asterisk-commits
mailing list