| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
There was two cases where instead of freeing the queue, we actually
clear the queue so it's ready for reused. Notably in
nice_socket_free_send_queue(), a missed name function and nicesrc
element state change.
This regression was introduced by: fa783b1dd727a6ee2b99a111ca24790ae850c2f7
|
|
|
|
|
|
| |
This is new warning introduced with GCC 8. This is being fixed by using appropriate function, like g_queue_free_full/g_list_free_full or by casting to GCallback before casting to the target function signature.
Closes: #46
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
• rename to nice_socket_is_based_on() and swap the order of arguments
accordingly; the implementation doesn't have to use the confusing
'return other->is_base_of()' pattern anymore
• fix potential NULL dereferences
The argument order in agent_recv_message_unlocked() was already wrongly
swapped in 1732c7d6 and thus this commit isn't changing it back because
that order has become the correct one.
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Differential Revision: https://phabricator.freedesktop.org/D866
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have to call is_base_of "virtual function pointer" of 'other'
object, not 'sock', since 'other' is the structure whose base
NiceSocket we need to get from its private data.
For instance calling nice_socket_is_base_of() with 'sock' and 'other'
being respectively pseudo-SSL and UDP-TURN-over-TCP invoked is_base_of
variant for pseudo-SSL, casting other->priv into PseudoSSLPriv *, but
other->priv is actually TurnTcpPriv *. It must be called the other way
around.
https://phabricator.freedesktop.org/T7335
https://phabricator.freedesktop.org/T7336
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Reviewed-by: José Antonio Santos Cadenas <santoscadenas@gmail.com>
Reviewed-by: Philip Withnall <philip@tecnocode.co.uk>
Reviewed-by: José Antonio Santos Cadenas <santoscadenas@gmail.com>
Differential Revision: https://phabricator.freedesktop.org/D785
|
|
|
|
|
|
|
|
| |
This will be used in the next commit.
Maniphest Tasks: T114
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Differential Revision: https://phabricator.freedesktop.org/D240
|
| |
|
| |
|
|
|
|
|
|
| |
The add_to_be_sent was duplicated in http/socks5/pseudossl/tcp-bsd and
had some small differences. It's better to factor it out so bug fixes
get applied to all of them and code is cleaner.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One issue with tcp-bsd is that it will queue messages when the tcp socket
is not writable, but it will also drop messages when the queue is full.
If we want to do proper reliable ice-tcp, we need to make sure that
messages don't get dropped, also, this would affect http/socks5/pseudossl
if their messages get dropped. For ice-tcp, when the socket is not writable
we want to return 0, not queue the message.
The change here is to allow connchecks and other important protocol messages
to be sent as 'reliable' on tcp transports by queuing them and in the various
socket layers and to never drop them, but all user messages will be dropped.
if the tcp socket is not writable.
|
|
|
|
| |
It was used correctly only half the time anyway
|
|
|
|
|
| |
We never send multiple messages to separate targets in practice, so
this will simplify the code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the send() API with a send_messages() API, which supports
sending multiple messages, each with multiple buffers rather than a
single monolithic buffer.
This doesn’t break API, as the socket API is not exposed outside
libnice. It does introduce a new struct: NiceOutputMessage, which is
analogous to struct mmsghdr and NiceInputMessage.
This includes updates to the test-bsd test to cover the changed API.
The existing nice_socket_send() API has been retained as a thin wrapper
around nice_socket_send_messages(), for convenience only. It’s hoped
that internal usage of this API will decline to the point where it can
be removed.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the recv() API with a recv_messages() API, which supports
receiving multiple messages, each with multiple buffers rather than a
single monolithic buffer.
This doesn’t break API, as the socket API is not exposed outside
libnice. It does introduce a new struct: NiceInputMessage, which is
analogous to struct mmsghdr.
This includes updates to the test-bsd test to cover the changed API.
|
| |
|
|
|
|
| |
tcp stuff from tcp-turn and made udp-turn into turn since it's generic
|
|
|
|
| |
send worked
|
|
|
|
| |
that define from not public functions and removed them from libnice.sym
|
|
|
|
| |
included before stdlib.h because it redefines atexit
|
| |
|
| |
|
| |
|
|
|