Skip to content

Commit

Permalink
Fix a typo introduced since f7e66da
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillan committed Nov 23, 2012
1 parent 885fb7c commit 025b381
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/SIPMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ JsSIP.IncomingRequest.prototype = new JsSIP.IncomingMessage();
JsSIP.IncomingRequest.prototype.reply = function(code, reason, extraHeaders, body, onSuccess, onFailure) {
var rr, vias, header, length, idx,
response = 'SIP/2.0 ' + code + ' ' + reason + '\r\n',
to = this.to,
to = this.getHeader('To'),
r = 0,
v = 0;

Expand Down Expand Up @@ -374,7 +374,7 @@ JsSIP.IncomingRequest.prototype.reply = function(code, reason, extraHeaders, bod
}

response += 'To: ' + to + '\r\n';
response += 'From: ' + this.from + '\r\n';
response += 'From: ' + this.getHeader('From') + '\r\n';
response += 'Call-ID: ' + this.call_id + '\r\n';
response += 'CSeq: ' + this.cseq + ' ' + this.method + '\r\n';

Expand Down Expand Up @@ -409,14 +409,14 @@ JsSIP.IncomingRequest.prototype.reply_sl = function(code, reason) {
response += 'Via: ' + this.getHeader('via', v) + '\r\n';
}

to = this.to;
to = this.getHeader('To');

if(!this.to_tag) {
to += ';tag=' + JsSIP.utils.newTag();
}

response += 'To: ' + to + '\r\n';
response += 'From: ' + this.from + '\r\n';
response += 'From: ' + this.getHeader('From') + '\r\n';
response += 'Call-ID: ' + this.call_id + '\r\n';
response += 'CSeq: ' + this.cseq + ' ' + this.method + '\r\n\r\n';

Expand Down
4 changes: 2 additions & 2 deletions src/SanityCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,14 @@ JsSIP.sanityCheck = (function() {
response += "Via: " + message.getHeader('via', idx) + "\r\n";
}

to = message.to;
to = message.getHeader('To');

if(!message.to_tag) {
to += ';tag=' + JsSIP.utils.newTag();
}

response += "To: " + to + "\r\n";
response += "From: " + message.from + "\r\n";
response += "From: " + message.getHeader('From') + "\r\n";
response += "Call-ID: " + message.call_id + "\r\n";
response += "CSeq: " + message.cseq + " " + message.method + "\r\n";
response += "\r\n";
Expand Down

0 comments on commit 025b381

Please sign in to comment.