summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2008-03-17 14:37:40 +0000
committerJoshua Colp <jcolp@digium.com>2008-03-17 14:37:40 +0000
commitf7f58d194ea379ed389ad334dd1fa16c260cbc3d (patch)
tree8861402a52c3f5b994656f53d83112c4b9bd863d
parent2c67438ebe7eb2d49d80e2f06b8d8dad88ed88a5 (diff)
Make sure that the temporary sip_request structure is empty so that copy_request doesn't think it already has an ast_str.
(closes issue #12231) Reported by: IgorG git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 9837dd1ef..0279cf948 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3088,7 +3088,7 @@ static int send_response(struct sip_pvt *p, struct sip_request *req, enum xmitty
ntohs(dst->sin_port), req->data->str);
}
if (p->do_history) {
- struct sip_request tmp;
+ struct sip_request tmp = { .rlPart1 = NULL, };
parse_copy(&tmp, req);
append_history(p, reliable ? "TxRespRel" : "TxResp", "%s / %s - %s", tmp.data->str, get_header(&tmp, "CSeq"),
(tmp.method == SIP_RESPONSE || tmp.method == SIP_UNKNOWN) ? tmp.rlPart2 : sip_methods[tmp.method].text);
@@ -3123,7 +3123,7 @@ static int send_request(struct sip_pvt *p, struct sip_request *req, enum xmittyp
ast_verbose("%sTransmitting (no NAT) to %s:%d:\n%s\n---\n", reliable ? "Reliably " : "", ast_inet_ntoa(p->sa.sin_addr), ntohs(p->sa.sin_port), req->data->str);
}
if (p->do_history) {
- struct sip_request tmp;
+ struct sip_request tmp = { .rlPart1 = NULL, };
parse_copy(&tmp, req);
append_history(p, reliable ? "TxReqRel" : "TxReq", "%s / %s - %s", tmp.data->str, get_header(&tmp, "CSeq"), sip_methods[tmp.method].text);
ast_free(tmp.data);