platform/upstream/libnice.git
9 years agotests: Remove g_type_init() calls
Philip Withnall [Wed, 30 Sep 2015 16:41:36 +0000 (17:41 +0100)]
tests: Remove g_type_init() calls

We depend on GLib 2.36.0, which deprecated g_type_init() since GType
initialisation is now done automatically.

Reviewed-by: Olivier Crête <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D296

9 years agoconncheck: rename priv_process_response_check_for_peer_reflexive()
Jakub Adam [Fri, 11 Sep 2015 10:57:54 +0000 (11:57 +0100)]
conncheck: rename priv_process_response_check_for_peer_reflexive()

Renamed the function to priv_process_response_check_for_reflexive()
because it now checks also for server reflexive candidates.

Updated the documentation to indicate that the function never returns
NULL.

Maniphest Tasks: https://phabricator.freedesktop.org/T115
Differential Revision: https://phabricator.freedesktop.org/D243
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
9 years agoconncheck: generate candidate pair for valid srflx candidate
Jakub Adam [Fri, 11 Sep 2015 10:56:02 +0000 (11:56 +0100)]
conncheck: generate candidate pair for valid srflx candidate

In priv_process_response_check_for_peer_reflexive(), mere presence of a candidate in local_candidates doesn't mean there's also some candidate
pair in conncheck_list using it - for instance that candidate may be server reflexive, for which no check pairs are initially created (see
conn_check_add_for_candidate_pair()).

If we fail to find corresponding pair upon receiving such candidate's IP in a conncheck response's XOR-MAPPED-ADDRESS attribute, we shall add a
new one in a similar way we would add a new pair for a just discovered peer reflexive candidate.

Previous priv_process_response_check_for_peer_reflexive() implementation would return NULL, causing a CandidateCheckPair with local candidate of
type HOST to be wrongly selected even though the local host IP might not be directly accessible by the remote counterpart (e.g. it's an address
on a private network segment). In practice this was coming through as a duplex connection that libnice was reporting as properly established,
but only one direction of the communication was actually working.

Maniphest Tasks: https://phabricator.freedesktop.org/T115
Differential Revision: https://phabricator.freedesktop.org/D242
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
9 years agoagent: check for base socket in _tcp_sock_is_writable()
Jakub Adam [Fri, 11 Sep 2015 10:33:51 +0000 (11:33 +0100)]
agent: check for base socket in _tcp_sock_is_writable()

The argument passed into the callback is always a base (TCP/UDP) socket,
which can't be directly compared with local candidate's sockptr (may be
TURN, http, or other socket wrapping another one). We're in fact
interested whether sock is a base socket of sockptr.

Maniphest Tasks: T114
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Differential Revision: https://phabricator.freedesktop.org/D241

9 years agosocket: add nice_socket_is_base_of()
Jakub Adam [Fri, 11 Sep 2015 10:29:39 +0000 (11:29 +0100)]
socket: add nice_socket_is_base_of()

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

9 years agobuild: Bump GLib dependency to 2.36
Philip Withnall [Thu, 10 Jul 2014 07:32:04 +0000 (08:32 +0100)]
build: Bump GLib dependency to 2.36

This is needed for G_IO_ERROR_BROKEN_PIPE, which is used in the I/O
stream code.

Reported by Emanuele Bizzarri <emabiz76@gmail.com> on the mailing list.

9 years agostun: Disable debug by default
Philip Withnall [Fri, 4 Sep 2015 07:14:08 +0000 (08:14 +0100)]
stun: Disable debug by default

To match debug_enable in agent/debug.c. Debug can still be enabled by
calling stun_debug_enable() or nice_debug_enable().

Spotted on the mailing list by Tom Chen.

9 years agoagent: Add assertions to check component state transitions are valid
Philip Withnall [Mon, 29 Jun 2015 15:30:12 +0000 (16:30 +0100)]
agent: Add assertions to check component state transitions are valid

There is no point in the NiceComponents having a state machine if the
state transition graph is not documented or enforced. Document and
enforce it.

http://phabricator.freedesktop.org/T120

9 years agoms-ice: ensure distinct candidate priority for multihomed hosts
Philip Withnall [Wed, 2 Sep 2015 15:44:45 +0000 (16:44 +0100)]
ms-ice: ensure distinct candidate priority for multihomed hosts

Summary:
Offering multiple host candidates with equal priorities could lead to unpredictable candidate pair selection by our counterparty.

Fixes call disconnection by MS Lync client after 30 seconds while VPN (2nd IP) was active on libnice host.

Maniphest Tasks: T3324

Reviewers: pwithnall

Projects: #libnice

Reviewed By: pwithnall

Subscribers: pwithnall

Differential Revision: https://phabricator.freedesktop.org/D234

9 years agocandidate: use distinct priority also for non-MS compatibilities
Jakub Adam [Wed, 2 Sep 2015 15:43:02 +0000 (16:43 +0100)]
candidate: use distinct priority also for non-MS compatibilities

Maniphest Tasks: T3324

Reviewers: pwithnall

Projects: #libnice

Reviewed By: pwithnall

Differential Revision: https://phabricator.freedesktop.org/D239

9 years agoconncheck: give temporary candidate_priority a base_addr
Jakub Adam [Wed, 2 Sep 2015 15:41:49 +0000 (16:41 +0100)]
conncheck: give temporary candidate_priority a base_addr

Summary:
Fixes "(nice_address_to_string): should not be reached" errors when calling nice_candidate_ms_ice_priority() because of invalid NiceAddress.

Maniphest Tasks: T3324

Reviewers: pwithnall

Projects: #libnice

Reviewed By: pwithnall

Subscribers: pwithnall

Differential Revision: https://phabricator.freedesktop.org/D238

9 years agoms-ice: ensure distinct candidate priority for multihomed hosts
Jakub Adam [Wed, 2 Sep 2015 15:41:49 +0000 (16:41 +0100)]
ms-ice: ensure distinct candidate priority for multihomed hosts

Summary:
Offering multiple host candidates with equal priorities could lead to unpredictable candidate pair selection by our counterparty.

Fixes call disconnection by MS Lync client after 30 seconds while VPN (2nd IP) was active on libnice host.

Maniphest Tasks: T3324

Reviewers: pwithnall

Projects: #libnice

Reviewed By: pwithnall

Subscribers: pwithnall

Differential Revision: https://phabricator.freedesktop.org/D234

9 years agodiscovery: assign candidate priority after base_addr is set
Jakub Adam [Wed, 2 Sep 2015 15:41:48 +0000 (16:41 +0100)]
discovery: assign candidate priority after base_addr is set

Summary: So that we can take the base address into account in the calculation.

Maniphest Tasks: T3324

Reviewers: pwithnall

Projects: #libnice

Reviewed By: pwithnall

Subscribers: pwithnall

Differential Revision: https://phabricator.freedesktop.org/D235

9 years agoms-turn: don't wait for a reply to STUN_SEND request
Philip Withnall [Wed, 2 Sep 2015 15:34:01 +0000 (16:34 +0100)]
ms-turn: don't wait for a reply to STUN_SEND request

Maniphest Tasks: T126

Reviewers: pwithnall

Projects: #libnice

Reviewed By: pwithnall

Subscribers: pwithnall

Differential Revision: https://phabricator.freedesktop.org/D223

9 years agoms-turn: don't wait for a reply to STUN_SEND request
Jakub Adam [Wed, 2 Sep 2015 15:32:05 +0000 (16:32 +0100)]
ms-turn: don't wait for a reply to STUN_SEND request

As per [MS-TURN] Section 2.2.1, TURN message type 0x0104 "Send request
response" isn't supported and the TURN server MUST NOT send them. Thus,
libnice should not remember Send requests in agent->sent_ids because
without replies coming, the number of allowed pending transaction gets
quickly exhausted, causing our data packets to be dropped until a
request timeout frees some space in the queue.

This behavior resulted in choppy reception of our audio on a Lync client
when connected via Lync Edge (TURN) Server.

Maniphest Tasks: T126

Reviewers: pwithnall

Projects: #libnice

Reviewed By: pwithnall

Subscribers: pwithnall

Differential Revision: https://phabricator.freedesktop.org/D223

9 years agoCreating TCP sockets with TCP_NODELAY option set to TRUE
Philip Withnall [Sat, 29 Aug 2015 22:26:00 +0000 (23:26 +0100)]
Creating TCP sockets with TCP_NODELAY option set to TRUE

Summary:
Disable Nagling for underlying TCP sockets used by libnice, because they
are typically used for streaming applications, or for pseudo-TCP; the
bandwidth in both cases is harmed by Nagling.

Based on a patch by Vadim Genkin.

Maniphest Tasks: T3317

Reviewers: vadimgenkin, pwithnall

Projects: #libnice

Reviewed By: pwithnall

Subscribers: pwithnall, vadimgenkin

Differential Revision: https://phabricator.freedesktop.org/D230

9 years agoCreating TCP sockets with TCP_NODELAY option set to TRUE
Philip Withnall [Sat, 29 Aug 2015 21:39:56 +0000 (22:39 +0100)]
Creating TCP sockets with TCP_NODELAY option set to TRUE

Disable Nagling for underlying TCP sockets used by libnice, because they
are typically used for streaming applications, or for pseudo-TCP; the
bandwidth in both cases is harmed by Nagling.

Based on a patch by Vadim Genkin.

Maniphest Tasks: T3317

Reviewers: pwithnall

Projects: #libnice

Subscribers: pwithnall, vadimgenkin

Differential Revision: https://phabricator.freedesktop.org/D230

9 years agoFix agent leak in case component socket is reset remotely
Philip Withnall [Sat, 29 Aug 2015 19:05:00 +0000 (20:05 +0100)]
Fix agent leak in case component socket is reset remotely

Summary: The patch fixes the issue where agent reference count is not properly decremented causing instance leak in cases where component's socket is reset remotely.

Reviewers: #libnice, pwithnall

Projects: #libnice

Reviewed By: #libnice, pwithnall

Subscribers: pwithnall, maximgolunov

Differential Revision: https://phabricator.freedesktop.org/D236

9 years agoFix agent leak in case component socket is reset remotely
Philip Withnall [Sat, 29 Aug 2015 19:04:03 +0000 (20:04 +0100)]
Fix agent leak in case component socket is reset remotely

Summary: The patch fixes the issue where agent reference count is not properly decremented causing instance leak in cases where component's socket is reset remotely.

Reviewers: #libnice, pwithnall

Projects: #libnice

Reviewed By: #libnice, pwithnall

Subscribers: pwithnall, maximgolunov

Differential Revision: https://phabricator.freedesktop.org/D236

9 years agobuild: Update .gitignore
Philip Withnall [Wed, 19 Aug 2015 08:24:27 +0000 (09:24 +0100)]
build: Update .gitignore

Add stun/usages/.dirstamp.

9 years agobuild: Fix multiple definition of CLEANFILES
Philip Withnall [Wed, 19 Aug 2015 08:22:49 +0000 (09:22 +0100)]
build: Fix multiple definition of CLEANFILES

It’s already defined in common.mk.

9 years agobuild: Add .arcconfig file
Philip Withnall [Wed, 19 Aug 2015 08:20:01 +0000 (09:20 +0100)]
build: Add .arcconfig file

This completes the transition to Phabricator; everyone should be using
the same project settings now.

https://phabricator.freedesktop.org/tag/libnice/

9 years agosocket: Handle ECONNRESET as EWOULDBLOCK on Windows
Philip Withnall [Wed, 19 Aug 2015 08:19:18 +0000 (09:19 +0100)]
socket: Handle ECONNRESET as EWOULDBLOCK on Windows

Summary:
Some versions of Windows can return ECONNRESET for UDP recvmsg() calls
if they would otherwise block. Hence, handle the two equivalently; this
should not affect behaviour on Linux, which apparently does not return
ECONNRESET for UDP recvmsg() calls at all.

https://phabricator.freedesktop.org/T121

Maniphest Tasks: T121

Reviewers: ocrete

Projects: #libnice

Reviewed By: ocrete

Subscribers: stwiname, felixSchl

Differential Revision: https://phabricator.freedesktop.org/D227

9 years agosocket: Close base socket for a TCP passive socket when closing parent
Philip Withnall [Wed, 19 Aug 2015 08:16:53 +0000 (09:16 +0100)]
socket: Close base socket for a TCP passive socket when closing parent

Summary:
Otherwise the base socket will leak. Spotted by Vadim Genkin.

https://phabricator.freedesktop.org/T125

Maniphest Tasks: T125

Reviewers: ocrete

Projects: #libnice

Reviewed By: ocrete

Subscribers: vadimgenkin

Differential Revision: https://phabricator.freedesktop.org/D228

9 years agosocket: Close base socket for a TCP passive socket when closing parent
Philip Withnall [Tue, 18 Aug 2015 13:58:23 +0000 (14:58 +0100)]
socket: Close base socket for a TCP passive socket when closing parent

Otherwise the base socket will leak. Spotted by Vadim Genkin.

https://phabricator.freedesktop.org/T125

9 years agoagent: Remove unused inet_pton() function
Philip Withnall [Tue, 18 Aug 2015 13:03:41 +0000 (14:03 +0100)]
agent: Remove unused inet_pton() function

Summary:
As spotted by Felix <felixschlitter@gmail.com>. This is a static
function which is totally unused in this compilation unit and is causing
build failures with `-Werror=unused-function`.

Maniphest Tasks: T123

Reviewers: felixSchl, ocrete

Projects: #libnice

Differential Revision: https://phabricator.freedesktop.org/D221

9 years agoagent: Remove unused inet_pton() function
Philip Withnall [Tue, 30 Jun 2015 13:39:51 +0000 (14:39 +0100)]
agent: Remove unused inet_pton() function

As spotted by Felix <felixschlitter@gmail.com>. This is a static
function which is totally unused in this compilation unit and is causing
build failures with -Werror=unused-function.

http://phabricator.freedesktop.org/T123

9 years agosocket: Handle ECONNRESET as EWOULDBLOCK on Windows
Philip Withnall [Tue, 18 Aug 2015 12:33:23 +0000 (13:33 +0100)]
socket: Handle ECONNRESET as EWOULDBLOCK on Windows

Some versions of Windows can return ECONNRESET for UDP recvmsg() calls
if they would otherwise block. Hence, handle the two equivalently; this
should not affect behaviour on Linux, which apparently does not return
ECONNRESET for UDP recvmsg() calls at all.

https://phabricator.freedesktop.org/T121

9 years agoconncheck: set writable callback to socket from TCP active connect
Jakub Adam [Thu, 18 Jun 2015 07:05:21 +0000 (09:05 +0200)]
conncheck: set writable callback to socket from TCP active connect

A new socket created in nice_tcp_active_socket_connect() should have its
writable callback set, because it's possible for it to become a base
socket of a peer reflexive candidate, if some is discovered by
connection checks on that TCP active candidate.

Previously, when such prflx candidate became selected, without write_cb
on the socket the agent was never notified about it becoming writable
again after the socket's buffer got filled up. This caused the data flow
to hang permanently.

Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Reviewed-by: Olivier Crête <olivier.crete@collabora.com>
http://phabricator.freedesktop.org/T117

9 years agopseudotcp: Only define errnos on Windows if not already defined
Philip Withnall [Tue, 30 Jun 2015 13:29:43 +0000 (14:29 +0100)]
pseudotcp: Only define errnos on Windows if not already defined

Recent versions of MinGW define at least ECONNABORTED and EAFNOSUPPORT,
so only define the various socket errnos if they are not defined
already.

Based on a patch by Alexey Pawlow <alexey.pawlow@gmail.com> and Felix
<felixschlitter@gmail.com>.

Reviewed-by: Olivier Crete <olivier.crete@collabora.com>
Reviewed-by: Felix Schlitter <felixschlitter@gmail.com>
http://phabricator.freedesktop.org/T122

9 years agoUse G_GSIZE_FORMAT instead of %zu
Felix Schlitter [Mon, 29 Jun 2015 19:37:31 +0000 (07:37 +1200)]
Use G_GSIZE_FORMAT instead of %zu

The C runtime on windows does not implement a printf that understands
%zu and other C99 format specifiers. Use G_GSIZE_FORMAT instead. This
is further consistent with the rest of the code base that makes use of
G_GSIZE_FORMAT throughout.

https://github.com/libnice/libnice/pull/3

9 years agoSplit "verbose" on-every-packet messages to a verbose log
Olivier Crête [Thu, 18 Sep 2014 23:33:10 +0000 (19:33 -0400)]
Split "verbose" on-every-packet messages to a verbose log

This way, the regular log will only contain connection-time information.

9 years agostun: Remove annoying non-error on non-STUN packet
Olivier Crête [Thu, 18 Sep 2014 23:33:06 +0000 (19:33 -0400)]
stun: Remove annoying non-error on non-STUN packet

9 years agoconfigure: Fix configure failure when building without gstreamer support
Timo Gurr [Mon, 1 Jun 2015 14:10:16 +0000 (16:10 +0200)]
configure: Fix configure failure when building without gstreamer support

Error introduced in 20ea22e0a11a9bdfe4d8125b68083249b694338a, resulting in a
configure/build error when building without gstreamer:

configure: error: conditional "HAVE_GST_CHECK" was never defined.
Usually this means the macro was only invoked conditionally.

https://bugs.freedesktop.org/show_bug.cgi?id=90801

9 years agobuild: Auto-generate win32 .def file from libnice.sym
Philip Withnall [Fri, 8 May 2015 09:13:39 +0000 (10:13 +0100)]
build: Auto-generate win32 .def file from libnice.sym

We’ve neglected to manually update this file once too often — it’s been
out of date for important new symbols (for example,
nice_agent_get_io_stream()) since at least 0.1.11.

Since the format is a simple extension of libnice.sym, we might as well
automatically generate it at dist time.

9 years agoRemoving no-op assignment
Youness Alaoui [Tue, 5 May 2015 19:07:10 +0000 (15:07 -0400)]
Removing no-op assignment

9 years agoDo not compare scope for IPv6 address when scope is 0
Youness Alaoui [Tue, 5 May 2015 19:00:30 +0000 (15:00 -0400)]
Do not compare scope for IPv6 address when scope is 0

This caused issues with thinking local host candidates were peer-reflexive
candidates because the nice_address_equal would fail since the scope
would be 6 (or some other value) but locally created NiceAddress from
a stun response would have the scope set to 0.
We ignore the scope when comparing ipv6 candidates when scope is 0
to avoid these kinds of issues.
Thanks to ikonst_ for finding these issues

9 years agoDo not update a remote candidate's type
Youness Alaoui [Tue, 5 May 2015 18:24:15 +0000 (14:24 -0400)]
Do not update a remote candidate's type

When adding a remote candidate, if it's the same ip:port, we should
also check its type, otherwise it's a new candidate. We can't allow
a candidate type to be updated. This caused issues to ikonst_ on IRC
where for some reason a host candidate appeared as both host and prflx
and the update caused a remote host candidate to be updated to prflx
causing a crash when the sockptr was being accessed.

9 years agoagent: Remove unnecessary NULL check
Philip Withnall [Sun, 3 May 2015 15:05:30 +0000 (16:05 +0100)]
agent: Remove unnecessary NULL check

With the changes in commit 483bdcf8, @name is now guaranteed to be
non-NULL. Spotted by Coverity.

CID: #109878

9 years agoVersion 0.1.13.1
Olivier Crête [Tue, 28 Apr 2015 19:44:13 +0000 (15:44 -0400)]
Version 0.1.13.1

9 years agoVersion 0.1.13 0.1.13
Olivier Crête [Tue, 28 Apr 2015 19:37:57 +0000 (15:37 -0400)]
Version 0.1.13

9 years agoexamples: Use the correct g_io_channel_win32_new_fd() function
Olivier Crête [Tue, 28 Apr 2015 18:48:13 +0000 (14:48 -0400)]
examples: Use the correct g_io_channel_win32_new_fd() function

9 years agoagent: Fix a utility function being defined unnecessarily
Philip Withnall [Fri, 24 Apr 2015 09:27:41 +0000 (10:27 +0100)]
agent: Fix a utility function being defined unnecessarily

sockaddr_to_string() is not needed on UNIX when compiling without
HAVE_GETIFADDRS. This fixes a compiler warning in that case.

9 years agoagent: Add a missing cast when compiling without HAVE_GETIFADDRS
Philip Withnall [Fri, 24 Apr 2015 09:27:07 +0000 (10:27 +0100)]
agent: Add a missing cast when compiling without HAVE_GETIFADDRS

9 years agoagent: Move utility function outside #ifdef
Philip Withnall [Fri, 24 Apr 2015 09:18:32 +0000 (10:18 +0100)]
agent: Move utility function outside #ifdef

This fixes compilation when HAVE_GETIFADDRS is not define. Reported on
the mailing list by Curieux Tres <trescurieux@yahoo.fr>.

9 years agostun: Add missing casts to unit tests
Philip Withnall [Thu, 23 Apr 2015 08:42:24 +0000 (09:42 +0100)]
stun: Add missing casts to unit tests

This fixes some compiler warnings.

9 years agoexamples: Make them built on non-win32 with GLib < 2.36
Olivier Crête [Thu, 23 Apr 2015 01:26:09 +0000 (21:26 -0400)]
examples: Make them built on non-win32 with GLib < 2.36

9 years agoVersion 0.1.12.1
Olivier Crête [Thu, 23 Apr 2015 01:13:24 +0000 (21:13 -0400)]
Version 0.1.12.1

9 years agoVersion 0.1.12 0.1.12
Olivier Crête [Thu, 23 Apr 2015 01:11:17 +0000 (21:11 -0400)]
Version 0.1.12

9 years agoexamples: Make them build and work on Windows
Olivier Crête [Thu, 23 Apr 2015 00:56:09 +0000 (19:56 -0500)]
examples: Make them build and work on Windows

9 years agoagent: Print valid string even with no local candidates
Olivier Crête [Thu, 23 Apr 2015 00:54:50 +0000 (19:54 -0500)]
agent: Print valid string even with no local candidates

9 years agoagent: Fix SDP line counting
Olivier Crête [Wed, 22 Apr 2015 21:32:58 +0000 (17:32 -0400)]
agent: Fix SDP line counting

Fixes SDP parsing which I broke in commit 5972db04

9 years agonicesrc: Attach the receive callback in READY->PAUSED and detach in PAUSED->READY
Sebastian Dröge [Thu, 19 Mar 2015 08:19:23 +0000 (09:19 +0100)]
nicesrc: Attach the receive callback in READY->PAUSED and detach in PAUSED->READY

Receiving data before the element is ready to push them does not seem like the
best idea.

https://bugs.freedesktop.org/show_bug.cgi?id=89673

9 years agonicesrc: Keep the mutex locked whenever accessing the queue
Sebastian Dröge [Thu, 19 Mar 2015 08:17:38 +0000 (09:17 +0100)]
nicesrc: Keep the mutex locked whenever accessing the queue

https://bugs.freedesktop.org/show_bug.cgi?id=89673

9 years agoVersion 0.1.11.1
Olivier Crête [Mon, 20 Apr 2015 21:30:06 +0000 (17:30 -0400)]
Version 0.1.11.1

9 years agoVersion 0.1.11 0.1.11
Olivier Crête [Mon, 20 Apr 2015 21:24:08 +0000 (17:24 -0400)]
Version 0.1.11

9 years agostunagent: Initiliaze variable
Olivier Crête [Mon, 20 Apr 2015 21:23:00 +0000 (17:23 -0400)]
stunagent: Initiliaze variable

This remove a gcc warning

9 years agoagent: Count m= files to match streams
Olivier Crête [Mon, 20 Apr 2015 20:09:28 +0000 (16:09 -0400)]
agent: Count m= files to match streams

The only valid way to match streams is to count m= lines, see RFC 3264.

https://bugs.freedesktop.org/show_bug.cgi?id=90019

9 years agoagent: Warn on invalid media types for SDP
Olivier Crête [Mon, 20 Apr 2015 20:08:42 +0000 (16:08 -0400)]
agent: Warn on invalid media types for SDP

Only 6 strings are valid.

https://bugs.freedesktop.org/show_bug.cgi?id=90019

9 years agoPrefix include guards
Olivier Crête [Mon, 20 Apr 2015 19:44:16 +0000 (15:44 -0400)]
Prefix include guards

The include file names are very generic, at least make
the guards a bit less generic.

https://bugs.freedesktop.org/show_bug.cgi?id=90013

9 years agoconfigure.ac: Fix error when GUPnP is requested and not available
Jose Antonio Santos Cadenas [Mon, 13 Apr 2015 08:50:04 +0000 (10:50 +0200)]
configure.ac: Fix error when GUPnP is requested and not available

https://bugs.freedesktop.org/show_bug.cgi?id=90010

9 years agogst: improve error when agent/stream/component is unset
Ilya Konstantinov [Thu, 9 Apr 2015 04:56:48 +0000 (07:56 +0300)]
gst: improve error when agent/stream/component is unset

https://bugs.freedesktop.org/show_bug.cgi?id=89962

9 years agoagent: Improve nice_agent_attach_recv and nice_agent_recv* docs
Ilya Konstantinov [Tue, 31 Mar 2015 23:42:50 +0000 (02:42 +0300)]
agent: Improve nice_agent_attach_recv and nice_agent_recv* docs

Explain that either having an I/O callback or calling nice_agent_recv*
is essential for ICE connection check to succeed.

https://bugs.freedesktop.org/show_bug.cgi?id=89849

9 years agostun: Add missing format attributes for va_list printf functions
Philip Withnall [Tue, 14 Apr 2015 10:05:44 +0000 (11:05 +0100)]
stun: Add missing format attributes for va_list printf functions

As detected by GCC 4.9.

9 years agoagent: Add API to set local credentials
Rohan Garg [Wed, 8 Apr 2015 21:10:14 +0000 (23:10 +0200)]
agent: Add API to set local credentials

Adds new API: nice_agent_set_local_credentials().

9 years agoagent: Whitespace fixes
Rohan Garg [Sat, 21 Mar 2015 22:24:10 +0000 (23:24 +0100)]
agent: Whitespace fixes

9 years agoconfigure: On Solaris, library is libnsl, not libnls
Olivier Crête [Sat, 28 Mar 2015 00:08:17 +0000 (20:08 -0400)]
configure: On Solaris, library is libnsl, not libnls

https://bugs.freedesktop.org/show_bug.cgi?id=73042

9 years agoconfigure: Disable static by default, and add win32 DLL support
Nirbheek Chauhan [Thu, 6 Nov 2014 10:46:51 +0000 (16:16 +0530)]
configure: Disable static by default, and add win32 DLL support

https://bugs.freedesktop.org/show_bug.cgi?id=85962

9 years agonicesink: Add test for buffer list support
Jose Antonio Santos Cadenas [Tue, 24 Mar 2015 11:07:34 +0000 (12:07 +0100)]
nicesink: Add test for buffer list support

https://bugs.freedesktop.org/show_bug.cgi?id=89609

9 years agonicesink: Add support for render buffer_list
Jose Antonio Santos Cadenas [Tue, 17 Mar 2015 10:00:26 +0000 (11:00 +0100)]
nicesink: Add support for render buffer_list

Also memory copies are reduced if buffers are fragmented

https://bugs.freedesktop.org/show_bug.cgi?id=89609

9 years agonicesrc: Clear the output buffer queue when shutting down and disposing
Sebastian Dröge [Thu, 19 Mar 2015 08:21:23 +0000 (09:21 +0100)]
nicesrc: Clear the output buffer queue when shutting down and disposing

https://bugs.freedesktop.org/show_bug.cgi?id=89673

9 years agoagent: Add missing preconditions to public API
Philip Withnall [Tue, 10 Mar 2015 12:42:02 +0000 (12:42 +0000)]
agent: Add missing preconditions to public API

Makes things a little bit safer to abuse.

9 years agoagent: Fix documentation to use ‘nul-terminated’ for strings
Philip Withnall [Tue, 10 Mar 2015 12:25:25 +0000 (12:25 +0000)]
agent: Fix documentation to use ‘nul-terminated’ for strings

NULL is ((gpointer) 0). nul is '\0'. Arrays can be NULL terminated.
Strings can be nul terminated.

9 years agostun: Fix documentation to use ‘nul-terminated’ for strings
Philip Withnall [Tue, 10 Mar 2015 12:24:37 +0000 (12:24 +0000)]
stun: Fix documentation to use ‘nul-terminated’ for strings

NULL is ((gpointer) 0). nul is '\0'. Arrays can be NULL terminated.
Strings can be nul terminated.

9 years agowin32: Update README
David Feurle [Sat, 7 Feb 2015 11:10:09 +0000 (12:10 +0100)]
win32: Update README

9 years agostun: Use dynamic array instead of stack allocated array
David Feurle [Sat, 7 Feb 2015 09:49:07 +0000 (10:49 +0100)]
stun: Use dynamic array instead of stack allocated array

Dynamic on-stack arrays are not supported in Visual Studio.

This has the downside of introducing an extra memory allocation into
libstun, but it’s on a debug path so should be harmless.

9 years agowin32: Update file list in Visual Studio project
David Feurle [Sat, 7 Feb 2015 09:46:39 +0000 (10:46 +0100)]
win32: Update file list in Visual Studio project

9 years agowin32: Remove outdated DLL files
David Feurle [Sat, 7 Feb 2015 09:35:51 +0000 (10:35 +0100)]
win32: Remove outdated DLL files

9 years agostun: Use sprintf() instead of snprintf() to support VS 2010
Philip Withnall [Thu, 30 Oct 2014 09:35:16 +0000 (09:35 +0000)]
stun: Use sprintf() instead of snprintf() to support VS 2010

Visual Studio 2010 still doesn’t support C99, and snprintf() is a C99
function, so compilation fails with:
    error: C3861: 'snprintf': identifier not found

Use sprintf() instead, which is C89 and thus supported. This does not
make the code unsafe, as the format specifier is constrained to two
characters (+ trailing nul), which are guaranteed to fit in the array
bounds.

Reported on the mailing list:
http://lists.freedesktop.org/archives/nice/2014-October/000978.html

9 years agoRemove duplicate ips from nice_interfaces
Youness Alaoui [Sat, 15 Nov 2014 21:17:58 +0000 (16:17 -0500)]
Remove duplicate ips from nice_interfaces
OpenVPN creates a tun interface having the same IP assigned twice like:

9: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc ...100
    link/none
    inet 10.222.111.10 peer 10.222.111.9/32 brd 10.222.111.10 scope global tun0
       valid_lft forever preferred_lft forever
    inet 10.222.111.10/32 brd 10.222.111.10 scope global tun0
       valid_lft forever preferred_lft forever

This interface would generate two identical host candidates with the same value
of foundation.

9 years agoVersion 0.1.10.1
Olivier Crête [Thu, 29 Jan 2015 03:37:51 +0000 (22:37 -0500)]
Version 0.1.10.1

9 years agoVersion 0.1.10 0.1.10
Olivier Crête [Thu, 29 Jan 2015 03:35:09 +0000 (22:35 -0500)]
Version 0.1.10

9 years agonicesink: unblock pending write on component change
Jakub Adam [Thu, 25 Sep 2014 13:50:30 +0000 (15:50 +0200)]
nicesink: unblock pending write on component change

When a nicesink switches to a different component, we should unblock any
pending write waiting in gst_nice_sink_render() for writable_cond being
signalled because if the new transport already is writable, we'll never
get notified about the condition and thus nicesink will wait forever.

That way, either the pending data are immediately sent or the nicesink
blocks again until the transport becomes writable.

9 years agoconfigure: Add "subdir-objects" automake option
Olivier Crête [Thu, 29 Jan 2015 02:56:49 +0000 (21:56 -0500)]
configure: Add "subdir-objects" automake option

Automake now warns that it will be the only behavior
in the future. So quell the warning by adding it.

9 years agoVersion 0.1.9.1
Olivier Crête [Thu, 29 Jan 2015 02:46:33 +0000 (21:46 -0500)]
Version 0.1.9.1

9 years agoVersion 0.1.9 0.1.9
Olivier Crête [Thu, 29 Jan 2015 02:44:04 +0000 (21:44 -0500)]
Version 0.1.9

9 years agoOnly change the receiving nicesock for udp-turn for ice-tcp
Youness Alaoui [Tue, 20 Jan 2015 17:31:11 +0000 (12:31 -0500)]
Only change the receiving nicesock for udp-turn for ice-tcp

The code was in the wrong spot, for OC2007, we need to fix the
nicesock used only in the case of udp-turn-over-tcp for OC2007
compatibility mode. With the current code, it was thinking that
the data came from TURN for every udp packet.
This should hopefully fix : https://github.com/EricssonResearch/openwebrtc/issues/85

9 years agodocs: Enable documentation checks during `make check` by default
Philip Withnall [Fri, 2 Jan 2015 19:25:32 +0000 (19:25 +0000)]
docs: Enable documentation checks during `make check` by default

Now that they pass, we should endeavour to ensure they continue to pass.

9 years agodocs: Add 0.1.8 API to the documentation index
Philip Withnall [Fri, 2 Jan 2015 19:25:07 +0000 (19:25 +0000)]
docs: Add 0.1.8 API to the documentation index

This should have been included before. This fixes `make check` in docs/.

9 years agodocs: Add various missing documentation comments and update sections.txt
Philip Withnall [Fri, 2 Jan 2015 19:24:31 +0000 (19:24 +0000)]
docs: Add various missing documentation comments and update sections.txt

This straightens out the last few bits of the documentation and almost
allows `make check` to pass in docs/.

9 years agodocs: Inform gtk-doc of the libnice namespace
Philip Withnall [Fri, 2 Jan 2015 19:23:39 +0000 (19:23 +0000)]
docs: Inform gtk-doc of the libnice namespace

This allows it to order the index a little better.

9 years agodocs: Use gtk-doc no-tmpl mode
Philip Withnall [Fri, 2 Jan 2015 19:22:23 +0000 (19:22 +0000)]
docs: Use gtk-doc no-tmpl mode

Templated mode has been deprecated for a long time and will be removed
in future versions of gtk-doc. Switch to no-tmpl mode for faster
documentation builds and future-proofness.

This does not bump our gtk-doc dependency, since gtk-doc 1.9 supported
no-tmpl mode.

9 years agodocs: Switch from gtk-doc SGML mode to XML mode
Philip Withnall [Fri, 2 Jan 2015 19:21:48 +0000 (19:21 +0000)]
docs: Switch from gtk-doc SGML mode to XML mode

We already used XML everywhere; just formally switch to XML mode and
eliminate the last few traces of SGML.

9 years agoagent: Document G_MESSAGES_DEBUG and NICE_DEBUG
Philip Withnall [Sat, 27 Dec 2014 09:49:37 +0000 (09:49 +0000)]
agent: Document G_MESSAGES_DEBUG and NICE_DEBUG

As requested on the mailing list, expand the documentation for
nice_debug_enable() to mention them.

9 years agoagent: Handle EWOULDBLOCK when transmitting pseudo-TCP segments
Philip Withnall [Mon, 15 Dec 2014 23:35:13 +0000 (23:35 +0000)]
agent: Handle EWOULDBLOCK when transmitting pseudo-TCP segments

The pseudo-TCP code previously didn’t handle EAGAIN or EWOULDBLOCK
errors from the low-level NiceSocket code. This caused pseudo-TCP
connections to be dropped if the transmitting socket ever filled up,
which could cause problems on high bandwidth connections.

Fix the issue by effectively dropping the packet on EWOULDBLOCK. This
will eventually get picked up by the pseudo-TCP recovery mechanism,
retransmitting the packet and throttling the sender. This should
hopefully reduce the system resource usage which caused EWOULDBLOCK in
the first place.

Spotted and debugged by Radosław Kołodziejczyk
<radek.kolodziejczyk@gmail.com>.

https://bugs.freedesktop.org/show_bug.cgi?id=87344

9 years agopseudotcp: Do roll-over safe assertion
Olivier Crête [Mon, 8 Dec 2014 15:22:21 +0000 (10:22 -0500)]
pseudotcp: Do roll-over safe assertion

In case of a roll-over, only the difference matters.

10 years agoagent: Add debug output for lifetime of Components and Streams
Philip Withnall [Fri, 14 Nov 2014 10:06:21 +0000 (10:06 +0000)]
agent: Add debug output for lifetime of Components and Streams

10 years agotests: Use G_SOURCE_[CONTINUE|REMOVE] instead of booleans
Philip Withnall [Thu, 6 Nov 2014 10:41:57 +0000 (10:41 +0000)]
tests: Use G_SOURCE_[CONTINUE|REMOVE] instead of booleans

Makes the test code a little clearer. Introduces no functional changes.

10 years agotests: Fix a memory leak in test-send-recv
Philip Withnall [Thu, 6 Nov 2014 10:40:53 +0000 (10:40 +0000)]
tests: Fix a memory leak in test-send-recv

If n_messages ≠ n_valid_messages.

10 years agoAdd ability to build static GST plugins
Nicolas Dufresne [Thu, 30 Oct 2014 21:09:41 +0000 (17:09 -0400)]
Add ability to build static GST plugins

Note that this only works for 1.0 plugin.

https://bugs.freedesktop.org/show_bug.cgi?id=85929