diff options
author | Mark Spencer <markster@digium.com> | 2005-07-28 18:24:04 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2005-07-28 18:24:04 +0000 |
commit | 9f136f57fe5d8fae51f7b318227588b1d7603607 (patch) | |
tree | ef296a399d25fb9cd12413827e29ccbf1afb31a2 /channels | |
parent | 716a6698182f6274aa8e1a68a6968c051aec9865 (diff) |
Don't delete RTP if there is a channel, even if we get REGISTER/SUBSCRIBE (bug #4534)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/chan_sip.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index fbf76cfb3..5756edf57 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -9488,19 +9488,11 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req, p->expiry = max_expiry; } /* Go ahead and free RTP port */ - if (p->rtp) { - if (p->owner) { - p->owner->fds[0] = -1; - p->owner->fds[1] = -1; - } + if (p->rtp && !p->owner) { ast_rtp_destroy(p->rtp); p->rtp = NULL; } - if (p->vrtp) { - if (p->owner) { - p->owner->fds[2] = -1; - p->owner->fds[3] = -1; - } + if (p->vrtp && !p->owner) { ast_rtp_destroy(p->vrtp); p->vrtp = NULL; } @@ -9526,19 +9518,11 @@ static int handle_request_register(struct sip_pvt *p, struct sip_request *req, i ast_log(LOG_NOTICE, "Registration from '%s' failed for '%s'\n", get_header(req, "To"), ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr)); 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; - } + if (p->rtp && !p->owner) { ast_rtp_destroy(p->rtp); p->rtp = NULL; } - if (p->vrtp) { - if (p->owner) { - p->owner->fds[2] = -1; - p->owner->fds[3] = -1; - } + if (p->vrtp && !p->owner) { ast_rtp_destroy(p->vrtp); p->vrtp = NULL; } |