List Info

Thread: SIP SDP BUG




SIP SDP BUG
user name
2007-06-19 03:29:30

Hi!

 

I want to report a bug:

 

package net.java.sip.communicator.impl.media;
CallSessionImpl.java

Method: private void initStreamTargets(Connection globalConnParam,

           ;           ;           ;  Vector mediaDescriptions)
 
The problem is in the first line: String globalConnectionAddress = globalConnParam.getAddress();
 
According to the Jain-SIP doc, globalConnParam (obtained from sdpAnswer.getConnection()) can be null, if the video and audio have different connection addresses, so Sip-Communicator doesn̵7;t support this case. The solution is very easy:
 
            // First, we test if there̵7;s a global address

String globalConnectionAddress = null;

           ; if (globalConnParam != null)

           ;       globalConnectionAddress = globalConnParam.getAddress();

           ;

           ; Iterator mediaDescsIter = mediaDescriptions.iterator();

           ; while (mediaDescsIter.hasNext())

           ; {

           ;     SessionAddress target = null;

           ;     MediaDescription mediaDescription

           ;         = (MediaDescription) mediaDescsIter.next();

 

           ;     int port = mediaDescription.getMedia().getMediaPort();

           ;     String type = mediaDescription.getMedia().getMediaType();

 

           ;     String address;

           ;    // If there̵7;s a global address, we use it.
           ;    // If there isn’t a global address, we get the address from the media Description

           ;     if (globalConnectionAddress != null)

           ;       address = globalConnectionAddress;

           ;     else

           ;            address = mediaDescription.getConnection().getAddress();
 
Regards. Pablo L.
 
 
Re: SIP SDP BUG
user name
2007-06-19 05:16:04
Hey Pablo,

Long time no chat.

You are absolutely right about this and your patch fixes the
problem.

I've committed it and updated your entry on the Team and
Contributors page.

Thank you!
Emil

Pablo wrote:
> Hi!
> I want to report a bug:
> package net.java.sip.communicator.impl.media;
> CallSessionImpl.java
> Method: *private* *void* initStreamTargets(Connection
globalConnParam,
>                                    Vector
mediaDescriptions)
>  
> The problem is in the first line: String
globalConnectionAddress = globalConnParam.getAddress();
>  
> According to the Jain-SIP doc, globalConnParam
(obtained from sdpAnswer.getConnection()) can be null, if
the video and audio have different connection addresses, so
Sip-Communicator doesn’t support this case. The solution is
very easy:
>  
>             // First, we test if there’s a global
address
> String globalConnectionAddress = *null*;
>             *if* (globalConnParam != *null*)
>                   globalConnectionAddress =
globalConnParam.getAddress();
>            
>             Iterator mediaDescsIter =
mediaDescriptions.iterator();
>             *while* (mediaDescsIter.hasNext())
>             {
>                 _SessionAddress_ target = *null*;
>                 MediaDescription mediaDescription
>                     = (MediaDescription)
mediaDescsIter.next();
>  
>                 *int* port =
mediaDescription.getMedia().getMediaPort();
>                 String type =
mediaDescription.getMedia().getMediaType();
>  
>                 String address;
>                // If there’s a global address, we use
it.
>                // If there isn’t a global address, we
get the address from the media Description
>                 *if* (globalConnectionAddress !=
*null*)
>                   address = globalConnectionAddress;
>                 *else*
>                        address =
mediaDescription.getConnection().getAddress();
>  
> Regards. Pablo L.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )