summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-02-07 07:13:33 +0000
committerMark Spencer <markster@digium.com>2004-02-07 07:13:33 +0000
commitae4adad5c45899d37fcf2931c7971af667e33972 (patch)
tree2eaf0b6ea450ded48ac40cf920a9c6906693eb8b /channels/chan_sip.c
parentcf4825233dba794494eba66745562f97a3eb476f (diff)
Insert blank after REFER (bug #997)
Correct path to VM sample (bug #994) Make manager interface non-blocking (bug #861) Don't bork on empty from in SIP (bug #887) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rwxr-xr-xchannels/chan_sip.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 873bc1dcb..6df1f5344 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3305,6 +3305,7 @@ static int transmit_refer(struct sip_pvt *p, char *dest)
add_header(&req, "Refer-To", referto);
if (strlen(p->our_contact))
add_header(&req, "Referred-By", p->our_contact);
+ add_blank_header(&req);
return send_request(p, &req, 1, p->ocseq);
}
@@ -3888,8 +3889,10 @@ static int get_destination(struct sip_pvt *p, struct sip_request *oreq)
if ((a = strchr(c, ';'))) {
*a = '\0';
}
- if ((a = strchr(fr, '@')) || (a = strchr(fr, ';'))) {
- *a = '\0';
+ if (fr) {
+ if ((a = strchr(fr, '@')) || (a = strchr(fr, ';'))) {
+ *a = '\0';
+ }
}
if (sipdebug)
ast_verbose("Looking for %s in %s\n", c, p->context);