aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-06-19 22:00:18 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-06-19 22:00:18 +0000
commit4b3b9331c42bfd597e568c46f8ee67fe535f3cb8 (patch)
tree2bde59b310da7db7380eba6e25c797a0d5564b0e
parent5d6d30a25e9751d0139a8299529dde69b20baa8c (diff)
Fix fd's when we release rtp/vrtp
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5940 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xchannels/chan_sip.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 44bad0d5e..221402234 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -9189,10 +9189,18 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
}
/* Go ahead and free RTP port */
if (p->rtp) {
+ if (p->owner) {
+ p->owner->fds[0] = -1;
+ p->owner->fds[1] = -1;
+ }
ast_rtp_destroy(p->rtp);
p->rtp = NULL;
}
if (p->vrtp) {
+ if (p->owner) {
+ p->owner->fds[2] = -1;
+ p->owner->fds[3] = -1;
+ }
ast_rtp_destroy(p->vrtp);
p->vrtp = NULL;
}
@@ -9219,10 +9227,18 @@ static int handle_request_register(struct sip_pvt *p, struct sip_request *req, i
if (res < 1) {
/* Go ahead and free RTP port */
if (p->rtp) {
+ if (p->owner) {
+ p->owner->fds[0] = -1;
+ p->owner->fds[1] = -1;
+ }
ast_rtp_destroy(p->rtp);
p->rtp = NULL;
}
if (p->vrtp) {
+ if (p->owner) {
+ p->owner->fds[2] = -1;
+ p->owner->fds[3] = -1;
+ }
ast_rtp_destroy(p->vrtp);
p->vrtp = NULL;
}