Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
f45bf65a
Commit
f45bf65a
authored
Dec 20, 2011
by
Guillaume Beraudo
Browse files
Stores a different payload in Rtptransport.
parent
28a615de
Changes
3
Hide whitespace changes
Inline
Side-by-side
coreapi/TunnelManager.cc
View file @
f45bf65a
...
...
@@ -68,7 +68,7 @@ int TunnelManager::eXosipSelect(int max_fds, fd_set *s1, fd_set *s2, fd_set *s3,
TunnelManager
*
lTunnelMgr
=
(
TunnelManager
*
)
userdata
;
if
(
tv
!=
0
&&
tv
->
tv_sec
){
/*this is the select from udp.c, the one that is interesting to us*/
unsigned
int
i
;
int
i
;
int
udp_fd
=
eXosip_get_udp_socket
();
int
controlfd
=-
1
;
...
...
@@ -155,13 +155,13 @@ void TunnelManager::setCallback(StateCallback cb, void *userdata) {
mCallbackData
=
userdata
;
}
static
void
sCloseRtpTransport
(
void
*
userData
,
RtpTransport
*
t
){
((
TunnelManager
::
TunnelManager
*
)
userData
)
->
closeRtpTransport
(
t
);
static
void
sCloseRtpTransport
(
RtpTransport
*
t
,
void
*
userData
){
TunnelSocket
*
s
=
(
TunnelSocket
*
)
userData
;
TunnelManager
::
TunnelManager
*
manager
=
(
TunnelManager
::
TunnelManager
*
)
s
->
getUserPointer
();
manager
->
closeRtpTransport
(
t
,
s
);
}
void
TunnelManager
::
closeRtpTransport
(
RtpTransport
*
t
){
TunnelSocket
*
socket
=
(
TunnelSocket
*
)
t
->
data
;
mTransports
.
remove
(
t
);
mTunnelClient
->
closeSocket
(
socket
);
void
TunnelManager
::
closeRtpTransport
(
RtpTransport
*
t
,
TunnelSocket
*
s
){
mTunnelClient
->
closeSocket
(
s
);
ms_free
(
t
);
}
...
...
@@ -170,14 +170,14 @@ static RtpTransport *sCreateRtpTransport(void* userData, int port){
}
RtpTransport
*
TunnelManager
::
createRtpTransport
(
int
port
){
TunnelSocket
*
socket
=
mTunnelClient
->
createSocket
(
port
);
socket
->
setUserPointer
(
this
);
RtpTransport
*
t
=
ms_new0
(
RtpTransport
,
1
);
t
->
data
=
mTunnelClient
->
createSocket
(
port
);
t
->
t_getsocket
=
NULL
;
t
->
t_recvfrom
=
customRecvfrom
;
t
->
t_sendto
=
customSendto
;
t
->
close_fn
=
sCloseRtpTransport
;
t
->
close_data
=
this
;
mTransports
.
push_back
(
t
);
t
->
t_close
=
sCloseRtpTransport
;
t
->
data
=
socket
;
return
t
;
}
...
...
coreapi/TunnelManager.hh
View file @
f45bf65a
...
...
@@ -115,7 +115,7 @@ class UdpMirrorClient;
/**
* Destroy the given RtpTransport.
*/
void
closeRtpTransport
(
RtpTransport
*
t
);
void
closeRtpTransport
(
RtpTransport
*
t
,
TunnelSocket
*
s
);
/**
* Create an RtpTransport.
...
...
@@ -128,7 +128,6 @@ class UdpMirrorClient;
LinphoneCore
*
getLinphoneCore
();
private:
typedef
std
::
list
<
UdpMirrorClient
>
UdpMirrorClientList
;
typedef
std
::
list
<
RtpTransport
*>
RtpTransportList
;
virtual
bool
isStarted
();
virtual
bool
isReady
()
const
;
static
int
customSendto
(
struct
_RtpTransport
*
t
,
mblk_t
*
msg
,
int
flags
,
const
struct
sockaddr
*
to
,
socklen_t
tolen
);
...
...
@@ -156,7 +155,6 @@ class UdpMirrorClient;
void
stopClient
();
static
Mutex
sMutex
;
bool
mAutoDetectStarted
;
RtpTransportList
mTransports
;
LinphoneRtpTransportFactories
mTransportFactories
;
};
...
...
oRTP
@
cb6bd1b8
Subproject commit
728617bf729b7c27069dd23b95f21508b0fdd6b8
Subproject commit
cb6bd1b8684d94d473bed38dd02029bd3a48df6e
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment