Skip to content

Commit

Permalink
Fix references to 'this'
Browse files Browse the repository at this point in the history
s/this/session/ in RTCSession.prototype.receiveInviteResponse

Set 'this' to the UA instance in the configuration check to prevent
calls to 'this.logger' from failing
  • Loading branch information
Rob--W authored and jmillan committed Oct 29, 2014
1 parent 9ea89fe commit 3b1ee11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/RTCSession.js
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,7 @@ RTCSession.prototype.receiveInviteResponse = function(response) {
*/
function(e) {
session.logger.warn(e);
this.earlyDialogs[response.call_id + response.from_tag + response.to_tag].terminate();
session.earlyDialogs[response.call_id + response.from_tag + response.to_tag].terminate();
}
);
break;
Expand Down
4 changes: 2 additions & 2 deletions src/UA.js
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ UA.prototype.loadConfig = function(configuration) {
throw new JsSIP.Exceptions.ConfigurationError(parameter);
} else {
value = configuration[parameter];
checked_value = UA.configuration_check.mandatory[parameter](value);
checked_value = UA.configuration_check.mandatory[parameter].call(this, value);
if (checked_value !== undefined) {
settings[parameter] = checked_value;
} else {
Expand All @@ -815,7 +815,7 @@ UA.prototype.loadConfig = function(configuration) {
continue;
}

checked_value = UA.configuration_check.optional[parameter](value);
checked_value = UA.configuration_check.optional[parameter].call(this, value);
if (checked_value !== undefined) {
settings[parameter] = checked_value;
} else {
Expand Down

0 comments on commit 3b1ee11

Please sign in to comment.