summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-10-17 15:09:36 +0000
committerJoshua Colp <jcolp@digium.com>2007-10-17 15:09:36 +0000
commite24eee17976bdffaaca76e16a38bc64b675089c5 (patch)
treeee8228f7f84ecd1e712084bbace6f8603ece4f20 /channels
parentcd1e6873aaeda9c4e743b5c602698449f0b9b936 (diff)
Merged revisions 86063 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r86063 | file | 2007-10-17 12:06:36 -0300 (Wed, 17 Oct 2007) | 4 lines Don't schedule dialog destruction if a MESSAGE is received using an existing dialog. (closes issue #11010) Reported by: vadim ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 93a71468d..a64be1882 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -10453,14 +10453,16 @@ static void receive_message(struct sip_pvt *p, struct sip_request *req)
if (strcmp(content_type, "text/plain")) { /* No text/plain attachment */
transmit_response(p, "415 Unsupported Media Type", req); /* Good enough, or? */
- sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
+ if (!p->owner)
+ sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
return;
}
if (get_msg_text(buf, sizeof(buf), req)) {
ast_log(LOG_WARNING, "Unable to retrieve text from %s\n", p->callid);
transmit_response(p, "202 Accepted", req);
- sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
+ if (!p->owner)
+ sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
return;
}
@@ -10478,6 +10480,7 @@ static void receive_message(struct sip_pvt *p, struct sip_request *req)
} else { /* Message outside of a call, we do not support that */
ast_log(LOG_WARNING,"Received message to %s from %s, dropped it...\n Content-Type:%s\n Message: %s\n", get_header(req,"To"), get_header(req,"From"), content_type, buf);
transmit_response(p, "405 Method Not Allowed", req); /* Good enough, or? */
+ sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
}
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
return;