[jitsi~svn:8976] Ignore protocol identifier of conference member addresses


#1

Well ... I am quite uncomfortable with all this address parsing going on
in the GUI. How about handling this through the proper equals() methods
in the corresponding contacts?

Emil

На 04.10.11 14:50, ibauersachs@java.net написа:

···

Project: jitsi
Repository: svn
Revision: 8976
Author: ibauersachs
Date: 2011-10-04 12:50:10 UTC
Link:

Log Message:
------------
Ignore protocol identifier of conference member addresses

Revisions:
----------
8976

Modified Paths:
---------------
trunk/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceFocusPanel.java

Diffs:
------
Index: trunk/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceFocusPanel.java

--- trunk/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceFocusPanel.java (revision 8975)
+++ trunk/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceFocusPanel.java (revision 8976)
@@ -448,17 +448,17 @@
         if (a.equals(b))
             return true;

- //TODO: this doesn't belong here
- if(a.startsWith("sip:"))
- a = a.substring(4);
- if(a.startsWith("sips:"))
- a = a.substring(5);
+ int aProtocolIndex = a.indexOf(':');
+ if(aProtocolIndex > -1)
+ a = a.substring(aProtocolIndex + 1);

- if(b.startsWith("sip:"))
- b = b.substring(4);
- if(b.startsWith("sips:"))
- b = b.substring(5);
+ int bProtocolIndex = b.indexOf(':');
+ if(bProtocolIndex > -1)
+ b = b.substring(bProtocolIndex + 1);

+ if (a.equals(b))
+ return true;
+
         int aServiceBegin = a.indexOf('@');
         String aUserID;
         String aService;
@@ -489,9 +489,9 @@
             int slashIndex = b.indexOf("/");

             if (slashIndex > 0)
- bService = b.substring(aServiceBegin + 1, slashIndex);
+ bService = b.substring(bServiceBegin + 1, slashIndex);
             else
- bService = b.substring(aServiceBegin + 1);
+ bService = b.substring(bServiceBegin + 1);
         }
         else
         {

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
Jitsi
emcho@jitsi.org PHONE: +33.1.77.62.43.30
http://jitsi.org FAX: +33.1.77.62.47.31


#2

Well ... I am quite uncomfortable with all this address parsing going on
in the GUI. How about handling this through the proper equals() methods
in the corresponding contacts?

trunk/src/net/java/sip/communicator/impl/gui/main/call/conference/Conferen
ceFocusPanel.java

@@ -448,17 +448,17 @@

Agreed, that doesn't belong there. Actually this commit is not really related to the SDES stuff. I noticed that the conference call panel made comparisons like "sip:ingo@service.ch" to "ingo@service.ch" which leads to 5 call panels for a conference with 3 parties. AFAIK the conference code only receives strings, not contacts.

I didn't want to make further changes in there as I don't know the conference code well enough. Who does?

Ingo