TunnelManager* lTunnelMgr=(TunnelManager*)userdata;
if (tv!=0 && tv->tv_sec){
/*this is the select from udp.c, the one that is interesting to us*/
- int i;
- int udp_fd=eXosip_get_udp_socket();
- int controlfd=-1;
-
- /*
- Find the udp fd and the control fd
- */
- for(i=0;i<max_fds;++i){
- if (FD_ISSET(i,s1) && i!=udp_fd){
- controlfd=i;
- break;
- }
- }
- if (controlfd==-1){
- ms_error("Could not find control fd !");
- return -1;
- }
+ NativeSocket udp_fd=(NativeSocket)eXosip_get_udp_socket();
+ NativeSocket controlfd=(NativeSocket)eXosip_get_control_fd();
+
FD_ZERO(s1);
gettimeofday(&begin,NULL);
do{
static void sCloseRtpTransport(RtpTransport *t, void *userData){
TunnelSocket *s=(TunnelSocket*)userData;
- TunnelManager::TunnelManager *manager=(TunnelManager::TunnelManager*)s->getUserPointer();
+ TunnelManager *manager=(TunnelManager*)s->getUserPointer();
manager->closeRtpTransport(t, s);
}
void TunnelManager::closeRtpTransport(RtpTransport *t, TunnelSocket *s){
}
static RtpTransport *sCreateRtpTransport(void* userData, int port){
- return ((TunnelManager::TunnelManager *) userData)->createRtpTransport(port);
+ return ((TunnelManager *) userData)->createRtpTransport(port);
}
RtpTransport *TunnelManager::createRtpTransport(int port){
#define __TUNNEL_CLIENT_MANAGER_H__
#include <list>
#include <string>
-#include "linphonecore.h"
#include "tunnel/client.hh"
+#include "linphonecore.h"
+
extern "C" {
#include "eXosip2/eXosip_transport_hook.h"
}
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
-#include "linphone_tunnel.h"
#include "TunnelManager.hh"
+#include "linphone_tunnel.h"
#include "linphonecore.h"
#include "private.h"
#include "lpconfig.h"