Skip to content

Commit

Permalink
FIx contact match in 200 response to REGISTER
Browse files Browse the repository at this point in the history
- Adapt to new JsSIP.URI style
  • Loading branch information
jmillan committed Feb 6, 2013
1 parent 4929b92 commit 2e18a6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Registrator.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ JsSIP.Registrator.prototype = {

while(contacts--) {
contact = response.parseHeader('contact', contacts);
if(contact.uri === this.ua.contact.uri) {
if(contact.uri.toString() === this.ua.contact.uri) {
expires = contact.getParam('expires');
break;
} else {
contact = null;
}
}

Expand Down

5 comments on commit 2e18a6b

@saghul
Copy link
Contributor

@saghul saghul commented on 2e18a6b Feb 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks a bit odd. Is contact.uri a URI which is converted to a string and then compared?

@jmillan
Copy link
Member Author

@jmillan jmillan commented on 2e18a6b Feb 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Contact uri is now a String. It will be a URI in the next commit. But this commit was mandatory to do right now ;-)

@saghul
Copy link
Contributor

@saghul saghul commented on 2e18a6b Feb 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm no expert but I should get popcorn and just watch how you and @ibc fight git xDDD

@ibc
Copy link
Member

@ibc ibc commented on 2e18a6b Feb 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Git naranja escribe fino
Git cristal escribe normal

@saghul
Copy link
Contributor

@saghul saghul commented on 2e18a6b Feb 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 colores a elegir: git git git git git!

Please sign in to comment.