[asterisk-commits] chan mgcp: Don't call close on fd -1. (asterisk[13])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jul 2 07:50:41 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:
Anonymous Coward #1000019: Verified
Matt Jordan: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index b75cd43..030df89 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -4995,7 +4995,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/769
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic48f3a82f51ada87f2fb0e016c9efe0ad56f1ee3
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
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