aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-21 23:00:22 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-21 23:00:22 +0000
commita6481d24dfd22fdeb04c701523392e3ee5ab32db (patch)
treebbbec8ac98629cdbd8b6a5038805b51cb80281f1 /channels
parentdae65ab3c80108969c3e309b392dfaa5c1cad8e9 (diff)
Don't actually destroy in handle_request
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1397 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_sip.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index d8aa0a244..02e16f0ae 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4850,7 +4850,7 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
if (res) {
if (res < 0) {
ast_log(LOG_NOTICE, "Failed to authenticate user %s for SUBSCRIBE\n", get_header(req, "From"));
- sip_destroy(p);
+ p->needdestroy = 1;
}
return 0;
}
@@ -4865,9 +4865,7 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
transmit_response(p, "404 Not Found", req);
else
transmit_response(p, "484 Address Incomplete", req);
- sip_destroy(p);
- p = NULL;
- c = NULL;
+ p->needdestroy = 1;
} else {
/* Initialize tag */
p->tag = rand();
@@ -4887,7 +4885,7 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
if (p) {
if (!(p->expiry = atoi(get_header(req, "Expires")))) {
transmit_response(p, "200 OK", req);
- sip_destroy(p);
+ p->needdestroy = 1;
return 0;
}
// The next line can be removed if the SNOM200 Expires bug is fixed