| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
| |
In case close() is called more than once.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
We cannot assume that the message will be completely filled even in
reliable mode.
|
|
|
|
|
| |
Cannot pass g_main_loop_quit as the GSourceFunc as its return type is
void.
|
|
|
|
|
| |
Due to off-by-one errors. Since the code added above now handles what
this code tried to handle, we can go ahead and remove it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this patch we ensure that local socket errors during connection
establishment are properly transmitted to the connection check layer, so
the related pair can be put in state failed when needed. The local
socket errors we are interested in, are those occuring when the local
source address cannot be bound anymore, because the underlying interface
vanished for example.
In particular, we don't ignore errors coming from g_socket_bind() with
tcp active sockets, that perform a bind to *whatever* local address is
available, in case it cannot bind to the specified address.
This behaviour was demonstrated with the test-tcp example, that tried
to bind to the IPv4 loopback address on a socket initially created for
the IPv6 loopback.
|
|
|
|
|
|
|
|
| |
Meson picks up the includedirs from the library target that it is
building the pkgconfig file for. Since libnice's headers are split
into the nice/ and agent/ subdirs, we need to add agent/ to
include_directories: so that it's automatically added to the
uninstalled pkgconfig file by Meson.
|
|
|
|
|
| |
E.g. if the server address is IPv6 but the local system cannot reach it,
so connect() fails right away.
|
|
|
|
|
|
|
| |
The patch invokes the conncheck timer creation where it makes most
sense: when a new pair is inserted in the conncheck list, and when a
pair is added to the triggered check list (because the conncheck
scheduler works on these two lists).
|
|
|
|
|
| |
This should make it possible to use OpenSSL or GnuTLS also on Windows if
required.
|
| |
|
| |
|
|
|
|
|
| |
Remove duplicated calls to dependency() so we can have fallback in all
cases.
|
|
|
|
| |
This is a fix over the recent fix in commit 574f44b4
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This patch ensures that related succeeded-discovered pairs change to
state failed simultaneously, to avoid leaving dangling pointers if one
is freeed while the other is still in the conncheck list. Such
transition is very rare, and only occurs in regular nomination mode,
when the network conditions change between the time the pair is
initially discovered and the time it is rechecked with the use-candidate
flag.
|
|
|
|
| |
In that case crypto_dep is a list and we can't call .found() method.
|
|
|
|
|
|
|
|
|
| |
Instead of having 3 independent implementations, make the simpler
versions delegate into the full one.
The simplest constructor needs to pass "no option", for which no
constant exists in the NiceAgentOption enum. Thus the new
NICE_AGENT_OPTION_NONE constant is added to reflect this possibility.
|
|
|
|
|
|
|
|
|
| |
As we only need a few primitives there isn't much OS-specific code
needed, and for applications that don't already depend on OpenSSL or
GnuTLS it simplifies the build process quite a lot.
Note that we use the vintage WinCrypt APIs as the Cryptography Next
Generation APIs are only available on Vista and newer.
|
|
|
|
|
|
|
|
|
| |
The stun agent may contain references to the password previously stored
in some remote candidates, freeed by nice_component_restart(), that were
used by keep-alive stun requests. These stun replies may arrive later
after ice has been restarted. Since the remote candidates are freeed
when ice is restarted, the stun agent must be reset to get rid of these
related references.
|
| |
|
| |
|
|
|
|
| |
It's not released yet and we don't do even/odd in this project.
|
|
|
|
| |
Also update the Since to 0.1.19, because it's not really usable now
|
|
|
|
| |
Also update the Since to 0.1.19, because it's not really usable now
|
|
|
|
| |
Add the relevant ifdef extern C bits
|
|
|
|
|
| |
The component can go from any state to FAILED, so simplify
that and make it explicit.
|
|
|
|
|
|
|
| |
When doing a ICE restart, which can be done from any state, we can
always go back into the gathering state.
This fixes a regression introduced by b20ac5ba7b731f2cc698f26e8def28a518de058e
|
|
|
|
| |
It just won't work for now.
|
|
|
|
| |
Getting it from the upstream mirror seems to fail miserably
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
To be consistent with what we do for ICE-TCP.
|
| |
|
|
|
|
| |
The type is already checked to not be peer reflexive earlier.
|
|
|
|
|
|
| |
Even if the agent is invalid, don't leak.
This makes coverity a little happier.
|
|
|
|
|
| |
This should make Coverity's job a little easier. And also fix a little
leak in the error path.
|
|
|
|
|
| |
As removing the request from the queue looks into the SendRequest, one
needs to unqueue it before freeing it.
|
|
|
|
|
|
|
|
|
|
| |
With this patch we free all outstanding refreshes when the agent dispose
method is called, even those that are in the way to be discarded
asynchronously, when a stream is removed.
We also make the final user callback of the refresh proces synchronous,
so we don't have to deal with an heap use-after-free problem. This also
requires to order some parts of code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Asynchronous refreshes pruning may occur when the agent async close
function is called, but also when a stream is closed. A flag
'discarding' is used in the CandidateRefresh object to determine
if a refresh is already on the way to be asynchronously freed. A refresh
definitely freed is removed from agent refresh_list.
When the agent async close function is called, it is passed a user
callback that will be invoked when all refreshes have been freed.
This is not exactly how things work currently, because right now, the
callback function is also invoked when all CandidateRefresh objects have
the discarding flag set, with the test 'data->items_to_free==0'. In that
case, clearly not all refreshes have been freed, as some are still there
in the refresh_list with the discarding flag set.
This is probably not what the user expects from the function
nice_agent_close_async(), where the callback is supposed to be invoked
after all refreshes have been freed: and including those asynchronously
pruned by nice_prune_stream_async().
This patch adds a supplementary timeout when closing the agent async,
that waits until the agent refresh list becomes empty.
|
|
|
|
|
| |
We keep refreshes having the discarding flag set. They may be freed later
if the agent main context remains alive after agent deletion.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch suggests the developer to close its alive reservations on
the turn server before disposing the agent.
Not removing reservations on the turn server, will make them alive until
their default timeout, generally 300 seconds, which is not fair for the
turn server resources, but also it may cause a fatal error 437,
"Mismatched allocation: wrong transaction ID", when another agent tries
to contact the same turn server using the same nat mapping before this
delay expires.
|