[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-developers] bug with oRTP sessions
From: |
Simon Morlat |
Subject: |
Re: [Linphone-developers] bug with oRTP sessions |
Date: |
Wed, 6 Dec 2006 13:43:17 +0100 |
User-agent: |
KMail/1.9.5 |
Hello,
I didn't know the OS was able to bind several socket on the same port.
I think you should add to your application the ability to remember what RTP
ports are being used what ports are free.
Otherwise removing the setsockopt() call with SO_REUSEADDR option from
src/rtpsession_inet.c will cause rtp_session_set_local_addr to return an
error if the socket is busy. The drawback is that even if a socket is closed,
you'll not be able to re-use it until a timeout occurs (this is controlled by
the kernel).
Simon
Le mercredi 29 novembre 2006 11:18, Camille Douine a écrit :
> Dear all,
>
> my team is working on an application using oRTP stack. We need to launch
> this application several time concurrently. We noticed that the same UDP
> port could be bound (using rtp_session_set_local_addr() ) to several RTP
> sessions, causing some mixing.
>
> I wrote a small program that shows that two sessions can be bound to the
> same port (see below for the source code and the results).
>
> We would need your help to answer the question : how can we detect if an
> UDP port is already in use and make sure to bind RTP session on
> distincts UDP ports?
>
> We are using FC 5 as operating system.
>
> Regards, Camille Douine
> IVèS
>
> > *Here is the source :*
> >
> > # include <ortp/ortp.h>
> > # include <stdio.h>
> >
> > int main(){
> >
> > RtpSession* session1;
> > RtpSession* session2;
> > int n,m;
> >
> > ortp_init();
> >
> > session1 = rtp_session_new(3);
> > n = rtp_session_set_local_addr(session1,"0.0.0.0",8357);
> > printf("local add1 : %d \n",n);
> >
> > session2 = rtp_session_new(3);
> > m = rtp_session_set_local_addr(session2,"0.0.0.0",8357);
> > printf("local add2 : %d \n",m);
> > }
> >
> > *Results :*
> >
> > local add1 : 0
> > local add2 : 0
>
> _______________________________________________
> Linphone-developers mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/linphone-developers
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Linphone-developers] bug with oRTP sessions,
Simon Morlat <=