Skip to content
Permalink
Browse files

FIx contact match in 200 response to REGISTER

- Adapt to new JsSIP.URI style
  • Loading branch information
jmillan committed Feb 6, 2013
1 parent 4929b92 commit 2e18a6b23942f78d03d48188efb2dc4e4ccac6d9
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/Registrator.js
@@ -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;
}
}

5 comments on commit 2e18a6b

@saghul

This comment has been minimized.

Copy link
Contributor

saghul replied Feb 6, 2013

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

@jmillan

This comment has been minimized.

Copy link
Member Author

jmillan replied Feb 6, 2013

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

This comment has been minimized.

Copy link
Contributor

saghul replied Feb 6, 2013

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

@ibc

This comment has been minimized.

Copy link
Member

ibc replied Feb 6, 2013

Git naranja escribe fino
Git cristal escribe normal

@saghul

This comment has been minimized.

Copy link
Contributor

saghul replied Feb 6, 2013

2 colores a elegir: git git git git git!

Please sign in to comment.
You can’t perform that action at this time.