Hello community,
here is the log from the commit of package libnice for openSUSE:Factory
checked in at Fri Jul 31 20:05:02 CEST 2009.
--------
--- GNOME/libnice/libnice.changes 2009-06-12 12:58:43.000000000 +0200
+++ /mounts/work_src_done/STABLE/libnice/libnice.changes 2009-06-22 13:55:23.000000000 +0200
@@ -1,0 +2,16 @@
+Mon Jun 22 13:24:15 CEST 2009 - dominique-obs@leuenberger.net
+
+- Update to version 0.0.8:
+ + Remove deprecated g_strcasecmp call
+ + Use addr instead of base_addr on assigning remote peer-
+ reflexive candidates (fixes crash)
+ + Use a global mutex and g_source_is_destroyed to avoid race
+ conditions (fixes crashes)
+ + Unlock the mutex before calling the recv callback
+
+-------------------------------------------------------------------
+Sun Jun 14 00:51:26 CEST 2009 - vuntz@novell.com
+
+- Add libgupnp-igd-devel BuildRequires.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
libnice-0.0.7.tar.bz2
New:
----
libnice-0.0.8.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libnice.spec ++++++
--- /var/tmp/diff_new_pack.rcJEyZ/_old 2009-07-31 20:04:07.000000000 +0200
+++ /var/tmp/diff_new_pack.rcJEyZ/_new 2009-07-31 20:04:07.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package libnice (Version 0.0.7)
+# spec file for package libnice (Version 0.0.8)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,9 +19,9 @@
Name: libnice
-Version: 0.0.7
+Version: 0.0.8
Release: 1
-License: LGPL v2.1 or later; MOZILLA PUBLIC LICENSE (MPL/NPL)
+License: LGPL v2.1 or later ; MPL ..
Group: System/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1030
@@ -30,8 +30,7 @@
BuildRequires: gstreamer010-devel
%endif
BuildRequires: glib2-devel openssl-devel
-# FIXME not available in openSUSE
-# BuildRequires: gupnp-igd-devel
+BuildRequires: libgupnp-igd-devel
Url: http://nice.freedesktop.org/
Source: http://nice.freedesktop.org/releases/%{name}-%{version}.tar.bz2
Summary: Interactive Connectivity Establishment implementation
@@ -55,7 +54,7 @@
%package -n gstreamer-0_10-libnice
-License: LGPL v2.1 or later; MOZILLA PUBLIC LICENSE (MPL/NPL)
+License: LGPL v2.1 or later ; MPL ..
Group: System/Libraries
Summary: Interactive Connectivity Establishment implementation - GStreamer plug-in
++++++ libnice-0.0.7.tar.bz2 -> libnice-0.0.8.tar.bz2 ++++++
++++ 1882 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libnice-0.0.7/INSTALL new/libnice-0.0.8/INSTALL
--- old/libnice-0.0.7/INSTALL 2008-11-27 20:05:05.000000000 +0100
+++ new/libnice-0.0.8/INSTALL 2009-06-20 00:38:26.000000000 +0200
@@ -1,16 +1,19 @@
Installation Instructions
*************************
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
-Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
-This file is free documentation; the Free Software Foundation gives
+ This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
-These are generic installation instructions.
+ Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
@@ -23,9 +26,9 @@
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. (Caching is
+the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
-cache files.)
+cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
@@ -35,20 +38,17 @@
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system. If you're
- using `csh' on an old version of System V, you might need to type
- `sh ./configure' instead to prevent `csh' from trying to execute
- `configure' itself.
+ `./configure' to configure the package for your system.
- Running `configure' takes awhile. While running, it prints some
- messages telling which features it is checking for.
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
2. Type `make' to compile the package.
@@ -67,42 +67,57 @@
all sorts of other programs in order to regenerate files that came
with the distribution.
+ 6. Often, you can also type `make uninstall' to remove the installed
+ files again.
+
Compilers and Options
=====================
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about. Run `./configure --help' for
-details on some of the pertinent environment variables.
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
- ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
-You can compile the package for more than one kind of computer at the
+ You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
-own directory. To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'. `cd' to the
+own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
- If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory. After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
Installation Names
==================
-By default, `make install' installs the package's commands under
+ By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
@@ -125,7 +140,7 @@
Optional Features
=================
-Some packages pay attention to `--enable-FEATURE' options to
+ Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
@@ -137,14 +152,36 @@
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `' header file. The option `-nodtk' can be used as
+a workaround. If GNU CC is not installed, it is therefore recommended
+to try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
Specifying the System Type
==========================
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
@@ -170,9 +207,9 @@
Sharing Defaults
================
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
@@ -181,7 +218,7 @@
Defining Variables
==================
-Variables not defined in a site shell script can be set in the
+ Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
@@ -190,21 +227,29 @@
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script). Here is a another example:
+overridden in the site shell script).
- /bin/bash ./configure CONFIG_SHELL=/bin/bash
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
-Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
-configuration-related scripts to be executed by `/bin/bash'.
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
-`configure' recognizes the following options to control how it operates.
+ `configure' recognizes the following options to control how it
+operates.
`--help'
`-h'
- Print a summary of the options to `configure', and exit.
+ Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+ Print a summary of the options unique to this package's
+ `configure', and exit. The `short' variant lists options used
+ only in the top level, while the `recursive' variant lists options
+ also present in any nested packages.
`--version'
`-V'
@@ -231,6 +276,16 @@
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
+`--prefix=DIR'
+ Use DIR as the installation prefix. *Note Installation Names::
+ for more details, including other options available for fine-tuning
+ the installation locations.
+
+`--no-create'
+`-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libnice-0.0.7/NEWS new/libnice-0.0.8/NEWS
--- old/libnice-0.0.7/NEWS 2009-06-11 20:37:45.000000000 +0200
+++ new/libnice-0.0.8/NEWS 2009-06-20 00:36:58.000000000 +0200
@@ -1,3 +1,11 @@
+libnice 0.0.8 (2009-06-19)
+===========================
+
+Remove deprecated g_strcasecmp call
+Use addr instead of base_addr on assigning remote peer-reflexive candidates (fixes crash)
+Use a global mutex and g_source_is_destroyed to avoid race conditions (fixes crashes)
+Unlock the mutex before calling the recv callback
+
libnice 0.0.7 (2009-06-11)
===========================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libnice-0.0.7/TODO new/libnice-0.0.8/TODO
--- old/libnice-0.0.7/TODO 2009-06-11 20:03:22.000000000 +0200
+++ new/libnice-0.0.8/TODO 2009-06-18 18:57:47.000000000 +0200
@@ -1,7 +1,11 @@
-check for the cookie and act accordingly for incoming messages.
+- High priority:
channel bind have a 10 minutes expiration :@
nice_socket_recv returns -1 means we must close the nice_socket and stop all connchecks/candidates and reelect if was eleected...
+
+- Medium priority:
+Add support for TURN-15
+
+- Low priority:
Add HTTP Digest support
-make sure the timers don't race condition with frees, and have some kind of refcounting (like in turn send requests) for timers
-Add support for TURN-13
+check for the cookie and act accordingly for incoming messages.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libnice-0.0.7/agent/agent-priv.h new/libnice-0.0.8/agent/agent-priv.h
--- old/libnice-0.0.7/agent/agent-priv.h 2009-06-10 01:40:29.000000000 +0200
+++ new/libnice-0.0.8/agent/agent-priv.h 2009-06-18 18:57:47.000000000 +0200
@@ -109,7 +109,6 @@
GSList *refresh_list; /* list of CandidateRefresh items */
guint64 tie_breaker; /* tie breaker (ICE sect 5.2
"Determining Role" ID-19) */
- GStaticRecMutex mutex; /* Mutex used for thread-safe lib */
NiceCompatibility compatibility; /* property: Compatibility mode */
StunAgent stun_agent; /* STUN agent */
gboolean media_after_tick; /* Received media after keepalive tick */
@@ -136,6 +135,9 @@
void agent_gathering_done (NiceAgent *agent);
void agent_signal_gathering_done (NiceAgent *agent);
+void agent_lock (void);
+void agent_unlock (void);
+
void agent_signal_new_selected_pair (
NiceAgent *agent,
guint stream_id,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libnice-0.0.7/agent/agent.c new/libnice-0.0.8/agent/agent.c
--- old/libnice-0.0.7/agent/agent.c 2009-06-10 01:40:29.000000000 +0200
+++ new/libnice-0.0.8/agent/agent.c 2009-06-18 18:57:47.000000000 +0200
@@ -115,6 +115,8 @@
static guint signals[N_SIGNALS];
+static GStaticRecMutex agent_mutex = G_STATIC_REC_MUTEX_INIT; /* Mutex used for thread-safe lib */
+
static gboolean priv_attach_stream_component (NiceAgent *agent,
Stream *stream,
Component *component);
@@ -122,6 +124,19 @@
static void priv_free_upnp (NiceAgent *agent);
+
+void agent_lock (void)
+{
+ g_static_rec_mutex_lock (&agent_mutex);
+}
+
+void agent_unlock (void)
+{
+ g_static_rec_mutex_unlock (&agent_mutex);
+}
+
+
+
StunUsageIceCompatibility
agent_to_ice_compatibility (NiceAgent *agent)
{
@@ -548,8 +563,6 @@
agent->rng = nice_rng_new ();
priv_generate_tie_breaker (agent);
-
- g_static_rec_mutex_init (&agent->mutex);
}
@@ -574,7 +587,7 @@
{
NiceAgent *agent = NICE_AGENT (object);
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
switch (property_id)
{
@@ -645,7 +658,7 @@
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
}
@@ -658,7 +671,7 @@
{
NiceAgent *agent = NICE_AGENT (object);
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
switch (property_id)
{
@@ -749,7 +762,7 @@
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
}
@@ -1061,7 +1074,7 @@
GSList *modified_list = NULL;
guint ret = 0;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
stream = stream_new (n_components);
if (stream) {
@@ -1080,7 +1093,7 @@
ret = stream->id;
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return ret;
}
@@ -1101,7 +1114,7 @@
g_return_val_if_fail (password, FALSE);
g_return_val_if_fail (type <= NICE_PROXY_TYPE_LAST, FALSE);
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
if (agent_find_component (agent, stream_id, component_id, NULL, &component)) {
TurnServer *turn = g_slice_new0 (TurnServer);
@@ -1111,7 +1124,7 @@
nice_address_set_port (&turn->server, server_port);
} else {
g_slice_free (TurnServer, turn);
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return FALSE;
}
@@ -1126,7 +1139,7 @@
component->turn_servers = g_list_append (component->turn_servers, turn);
}
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return TRUE;
}
@@ -1137,7 +1150,12 @@
NiceAgent *agent = (NiceAgent*)user_data;
GSList *i;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
+
+ if (g_source_is_destroyed (g_main_current_source ())) {
+ agent_unlock ();
+ return FALSE;
+ }
nice_debug ("Agent %p : UPnP port mapping timed out", agent);
@@ -1156,7 +1174,7 @@
agent_gathering_done (agent);
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return FALSE;
}
@@ -1170,7 +1188,7 @@
GSList *i, *j, *k;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
nice_debug ("Agent %p : Sucessfully mapped %s:%d to %s:%d", agent, local_ip,
local_port, external_ip, external_port);
@@ -1222,7 +1240,7 @@
agent_gathering_done (agent);
}
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
}
static void _upnp_error_mapping_port (GUPnPSimpleIgd *self, GError *error,
@@ -1233,7 +1251,7 @@
NiceAddress localaddr;
GSList *i;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
nice_debug ("Agent %p : Error mapping %s:%d to %d (%d) : %s", agent, local_ip,
local_port, external_port, error->domain, error->message);
@@ -1259,7 +1277,7 @@
}
}
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
}
#endif
@@ -1273,7 +1291,7 @@
GSList *i;
Stream *stream;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
stream = agent_find_stream (agent, stream_id);
if (stream == NULL) {
@@ -1415,7 +1433,7 @@
done:
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
}
static void priv_free_upnp (NiceAgent *agent)
@@ -1462,7 +1480,7 @@
Stream *stream;
GSList *i;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
stream = agent_find_stream (agent, stream_id);
if (!stream) {
@@ -1486,7 +1504,7 @@
priv_remove_keepalive_timer (agent);
done:
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
}
NICEAPI_EXPORT gboolean
@@ -1496,7 +1514,7 @@
GSList *modified_list;
gboolean ret = FALSE;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
dup = nice_address_dup (addr);
nice_address_set_port (dup, 0);
@@ -1509,7 +1527,7 @@
}
done:
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return ret;
}
@@ -1628,7 +1646,7 @@
Stream *stream;
gboolean ret = FALSE;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
stream = agent_find_stream (agent, stream_id);
/* note: oddly enough, ufrag and pwd can be empty strings */
@@ -1642,7 +1660,7 @@
}
done:
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return ret;
}
@@ -1656,7 +1674,7 @@
Stream *stream;
gboolean ret = TRUE;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
stream = agent_find_stream (agent, stream_id);
if (stream == NULL) {
@@ -1673,7 +1691,7 @@
done:
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return ret;
}
@@ -1686,7 +1704,7 @@
nice_debug ("Agent %p: set_remote_candidates %d %d", agent, stream_id, component_id);
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
stream = agent_find_stream (agent, stream_id);
if (stream == NULL) {
@@ -1730,7 +1748,7 @@
}
done:
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return added;
}
@@ -1820,7 +1838,7 @@
Component *component;
guint ret = -1;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
if (!agent_find_component (agent, stream_id, component_id, &stream, &component)) {
goto done;
@@ -1849,7 +1867,7 @@
}
done:
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return ret;
}
@@ -1864,17 +1882,16 @@
GSList * ret = NULL;
GSList * item = NULL;
- g_static_rec_mutex_lock (&agent->mutex);
- if (!agent_find_component (agent, stream_id, component_id, NULL, &component))
- {
- goto done;
- }
+ agent_lock();
+ if (!agent_find_component (agent, stream_id, component_id, NULL, &component)) {
+ goto done;
+ }
for (item = component->local_candidates; item; item = item->next)
ret = g_slist_append (ret, nice_candidate_copy (item->data));
done:
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return ret;
}
@@ -1888,7 +1905,7 @@
Component *component;
GSList *ret = NULL, *item = NULL;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
if (!agent_find_component (agent, stream_id, component_id, NULL, &component))
{
goto done;
@@ -1898,7 +1915,7 @@
ret = g_slist_append (ret, nice_candidate_copy (item->data));
done:
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return ret;
}
@@ -1910,7 +1927,7 @@
GSList *i;
gboolean res = TRUE;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
/* step: clean up all connectivity checks */
conn_check_free (agent);
@@ -1926,7 +1943,7 @@
res = stream_restart (stream, agent->rng);
}
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return res;
}
@@ -1979,7 +1996,6 @@
if (G_OBJECT_CLASS (nice_agent_parent_class)->dispose)
G_OBJECT_CLASS (nice_agent_parent_class)->dispose (object);
- g_static_rec_mutex_free (&agent->mutex);
}
@@ -2043,7 +2059,12 @@
gchar buf[MAX_BUFFER_SIZE];
gint len;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
+
+ if (g_source_is_destroyed (g_main_current_source ())) {
+ agent_unlock ();
+ return FALSE;
+ }
/* note: dear compiler, these are for you: */
(void)io;
@@ -2052,8 +2073,14 @@
MAX_BUFFER_SIZE, buf);
if (len > 0 && component->g_source_io_cb) {
- component->g_source_io_cb (agent, stream->id, component->id,
- len, buf, component->data);
+ gpointer data = component->data;
+ gint sid = stream->id;
+ gint cid = component->id;
+ NiceAgentRecvFunc callback = component->g_source_io_cb;
+ /* Unlock the agent before calling the callback */
+ agent_unlock();
+ callback (agent, sid, cid, len, buf, data);
+ goto done;
} else if (len < 0) {
GSource *source = ctx->source;
component->gsources = g_slist_remove (component->gsources, source);
@@ -2063,9 +2090,13 @@
* take care of every path where the socket might still be used.. */
nice_debug ("Agent %p: unable to recv from socket %p. Detaching", agent,
ctx->socket);
+
}
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
+
+ done:
+
return TRUE;
}
@@ -2150,7 +2181,7 @@
Stream *stream = NULL;
gboolean ret = FALSE;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
/* attach candidates */
@@ -2179,7 +2210,7 @@
done:
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return ret;
}
@@ -2196,7 +2227,7 @@
CandidatePair pair;
gboolean ret = FALSE;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
/* step: check that params specify an existing pair */
if (!agent_find_component (agent, stream_id, component_id, &stream, &component)) {
@@ -2220,7 +2251,7 @@
ret = TRUE;
done:
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return ret;
}
@@ -2254,7 +2285,7 @@
NiceCandidate *lcandidate = NULL;
gboolean ret = FALSE;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
/* step: check if the component exists*/
if (!agent_find_component (agent, stream_id, component_id, &stream, &component)) {
@@ -2281,6 +2312,6 @@
ret = TRUE;
done:
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return ret;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libnice-0.0.7/agent/conncheck.c new/libnice-0.0.8/agent/conncheck.c
--- old/libnice-0.0.7/agent/conncheck.c 2009-06-10 01:40:29.000000000 +0200
+++ new/libnice-0.0.8/agent/conncheck.c 2009-06-18 18:57:47.000000000 +0200
@@ -450,12 +450,17 @@
static gboolean priv_conn_check_tick (gpointer pointer)
{
- NiceAgent *agent = pointer;
gboolean ret;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
+ if (g_source_is_destroyed (g_main_current_source ())) {
+ nice_debug ("Source was destroyed. "
+ "Avoided race condition in priv_conn_check_tick");
+ agent_unlock ();
+ return FALSE;
+ }
ret = priv_conn_check_tick_unlocked (pointer);
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return ret;
}
@@ -464,14 +469,16 @@
{
CandidatePair *pair = (CandidatePair *) pointer;
- g_static_rec_mutex_lock (&pair->keepalive.agent->mutex);
+ agent_lock();
/* A race condition might happen where the mutex above waits for the lock
* and in the meantime another thread destroys the source.
* In that case, we don't need to run our retransmission tick since it should
* have been cancelled */
- if (pair->keepalive.tick_source == NULL) {
- g_static_rec_mutex_unlock (&pair->keepalive.agent->mutex);
+ if (g_source_is_destroyed (g_main_current_source ())) {
+ nice_debug ("Source was destroyed. "
+ "Avoided race condition in priv_conn_keepalive_retransmissions_tick");
+ agent_unlock ();
return FALSE;
}
@@ -532,7 +539,7 @@
}
- g_static_rec_mutex_unlock (&pair->keepalive.agent->mutex);
+ agent_unlock ();
return FALSE;
}
@@ -676,7 +683,14 @@
NiceAgent *agent = pointer;
gboolean ret;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
+ if (g_source_is_destroyed (g_main_current_source ())) {
+ nice_debug ("Source was destroyed. "
+ "Avoided race condition in priv_conn_keepalive_tick");
+ agent_unlock ();
+ return FALSE;
+ }
+
ret = priv_conn_keepalive_tick_unlocked (agent);
if (ret == FALSE) {
if (agent->keepalive_timer_source) {
@@ -685,7 +699,7 @@
agent->keepalive_timer_source = NULL;
}
}
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return ret;
}
@@ -694,17 +708,20 @@
{
CandidateRefresh *cand = (CandidateRefresh *) pointer;
- g_static_rec_mutex_lock (&cand->agent->mutex);
+ agent_lock();
/* A race condition might happen where the mutex above waits for the lock
* and in the meantime another thread destroys the source.
* In that case, we don't need to run our retransmission tick since it should
* have been cancelled */
- if (cand->tick_source == NULL) {
- g_static_rec_mutex_unlock (&cand->agent->mutex);
+ if (g_source_is_destroyed (g_main_current_source ())) {
+ nice_debug ("Source was destroyed. "
+ "Avoided race condition in priv_turn_allocate_refresh_retransmissions_tick");
+ agent_unlock ();
return FALSE;
}
+
g_source_destroy (cand->tick_source);
g_source_unref (cand->tick_source);
cand->tick_source = NULL;
@@ -738,7 +755,7 @@
}
- g_static_rec_mutex_unlock (&cand->agent->mutex);
+ agent_unlock ();
return FALSE;
}
@@ -810,9 +827,16 @@
{
CandidateRefresh *cand = (CandidateRefresh *) pointer;
- g_static_rec_mutex_lock (&cand->agent->mutex);
+ agent_lock();
+ if (g_source_is_destroyed (g_main_current_source ())) {
+ nice_debug ("Source was destroyed. "
+ "Avoided race condition in priv_turn_allocate_refresh_tick");
+ agent_unlock ();
+ return FALSE;
+ }
+
priv_turn_allocate_refresh_tick_unlocked (cand);
- g_static_rec_mutex_unlock (&cand->agent->mutex);
+ agent_unlock ();
return FALSE;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libnice-0.0.7/agent/discovery.c new/libnice-0.0.8/agent/discovery.c
--- old/libnice-0.0.7/agent/discovery.c 2009-06-10 21:16:12.000000000 +0200
+++ new/libnice-0.0.8/agent/discovery.c 2009-06-18 18:57:47.000000000 +0200
@@ -361,7 +361,7 @@
for (k = c->remote_candidates; k; k = k->next) {
NiceCandidate *n = k->data;
- NiceAddress temp = n->base_addr;
+ NiceAddress temp = n->addr;
/* note: candidate must not on the remote candidate list */
g_assert (candidate != n);
@@ -372,7 +372,7 @@
if (candidate->type == n->type &&
candidate->stream_id == n->stream_id &&
- nice_address_equal (&candidate->base_addr, &temp)) {
+ nice_address_equal (&candidate->addr, &temp)) {
/* note: currently only one STUN/TURN server per stream at a
* time is supported, so there is no need to check
* for candidates that would otherwise share the
@@ -1044,7 +1044,14 @@
NiceAgent *agent = pointer;
gboolean ret;
- g_static_rec_mutex_lock (&agent->mutex);
+ agent_lock();
+ if (g_source_is_destroyed (g_main_current_source ())) {
+ nice_debug ("Source was destroyed. "
+ "Avoided race condition in priv_discovery_tick");
+ agent_unlock ();
+ return FALSE;
+ }
+
ret = priv_discovery_tick_unlocked (pointer);
if (ret == FALSE) {
if (agent->discovery_timer_source != NULL) {
@@ -1053,7 +1060,7 @@
agent->discovery_timer_source = NULL;
}
}
- g_static_rec_mutex_unlock (&agent->mutex);
+ agent_unlock();
return ret;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libnice-0.0.7/agent/interfaces.c new/libnice-0.0.8/agent/interfaces.c
--- old/libnice-0.0.7/agent/interfaces.c 2009-03-09 21:34:55.000000000 +0100
+++ new/libnice-0.0.8/agent/interfaces.c 2009-06-18 18:57:47.000000000 +0200
@@ -495,7 +495,8 @@
if_table->table[i].wszName, MAX_INTERFACE_NAME_LEN,
NULL, NULL, NULL);
- if (g_strcasecmp (interface_name, tmp_str) == 0) {
+ if (strlen (interface_name) == strlen (tmp_str) &&
+ g_ascii_strncasecmp (interface_name, tmp_str, strlen (interface_name)) == 0) {
ret = win32_get_ip_for_interface (if_table->table[i].dwIndex);
g_free (tmp_str);
break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libnice-0.0.7/autogen.sh new/libnice-0.0.8/autogen.sh
--- old/libnice-0.0.7/autogen.sh 2008-11-27 20:04:59.000000000 +0100
+++ new/libnice-0.0.8/autogen.sh 2009-06-18 18:57:47.000000000 +0200
@@ -4,7 +4,7 @@
test -d m4 || mkdir m4
gtkdocize || exit 1
-autoreconf -i
+autoreconf -fi
run_configure=true
for arg in $*; do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libnice-0.0.7/common.mk new/libnice-0.0.8/common.mk
--- old/libnice-0.0.7/common.mk 2009-03-09 21:34:55.000000000 +0100
+++ new/libnice-0.0.8/common.mk 2009-06-18 18:57:47.000000000 +0200
@@ -11,7 +11,8 @@
-Wmissing-prototypes \
-Wstrict-prototypes \
-Wredundant-decls \
- -Wno-unused-parameter
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers
# -Wold-style-definition -Winline -Wunreachable-code
CLEANFILES = *.gcno *.gcda
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libnice-0.0.7/configure.ac new/libnice-0.0.8/configure.ac
--- old/libnice-0.0.7/configure.ac 2009-06-11 20:41:49.000000000 +0200
+++ new/libnice-0.0.8/configure.ac 2009-06-20 00:37:29.000000000 +0200
@@ -3,7 +3,7 @@
dnl releases only do -Wall, cvs and prerelease does -Werror too
dnl use a three digit version number for releases, and four for cvs/prerelease
-AC_INIT(libnice, 0.0.7)
+AC_INIT(libnice, 0.0.8)
LIBNICE_RELEASE="yes"
AC_CONFIG_SRCDIR([agent/agent.c])
@@ -34,7 +34,7 @@
# If there was an incompatible interface change:
# Increment CURRENT. Set AGE and REVISION to 0
LIBNICE_CURRENT=4
-LIBNICE_REVISION=1
+LIBNICE_REVISION=2
LIBNICE_AGE=4
LIBNICE_LIBVERSION=${LIBNICE_CURRENT}:${LIBNICE_REVISION}:${LIBNICE_AGE}
LIBNICE_LT_LDFLAGS="-version-info ${LIBNICE_LIBVERSION}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libnice-0.0.7/socket/tcp-bsd.c new/libnice-0.0.8/socket/tcp-bsd.c
--- old/libnice-0.0.7/socket/tcp-bsd.c 2009-06-11 20:04:00.000000000 +0200
+++ new/libnice-0.0.8/socket/tcp-bsd.c 2009-06-18 18:57:48.000000000 +0200
@@ -299,7 +299,14 @@
TcpPriv *priv = sock->priv;
struct to_be_sent *tbs = NULL;
- g_static_rec_mutex_lock (&priv->agent->mutex);
+ agent_lock ();
+
+ if (g_source_is_destroyed (g_main_current_source ())) {
+ nice_debug ("Source was destroyed. "
+ "Avoided race condition in tcp-bsd.c:socket_send_more");
+ agent_unlock ();
+ return FALSE;
+ }
while ((tbs = g_queue_pop_head (&priv->send_queue)) != NULL) {
int ret;
@@ -335,11 +342,11 @@
g_source_unref (priv->io_source);
priv->io_source = NULL;
- g_static_rec_mutex_unlock (&priv->agent->mutex);
+ agent_unlock ();
return FALSE;
}
- g_static_rec_mutex_unlock (&priv->agent->mutex);
+ agent_unlock ();
return TRUE;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libnice-0.0.7/socket/turn.c new/libnice-0.0.8/socket/turn.c
--- old/libnice-0.0.7/socket/turn.c 2009-06-02 19:07:09.000000000 +0200
+++ new/libnice-0.0.8/socket/turn.c 2009-06-18 18:57:48.000000000 +0200
@@ -90,7 +90,6 @@
StunTransactionId id;
GSource *source;
TurnPriv *priv;
- gint ref;
} SendRequest;
static void socket_close (NiceSocket *sock);
@@ -204,9 +203,7 @@
stun_agent_forget_transaction (&priv->agent, r->id);
- r->priv = NULL;
- if (g_atomic_int_dec_and_test (&r->ref))
- g_slice_free (SendRequest, r);
+ g_slice_free (SendRequest, r);
}
g_queue_free (priv->send_requests);
@@ -323,7 +320,6 @@
req->source = agent_timeout_add_with_context (priv->nice, STUN_END_TIMEOUT,
priv_forget_send_request, req);
g_queue_push_tail (priv->send_requests, req);
- g_atomic_int_inc (&req->ref);
}
}
@@ -346,34 +342,27 @@
priv_forget_send_request (gpointer pointer)
{
SendRequest *req = pointer;
- GStaticRecMutex *mutex = NULL;
- if (req->priv == NULL)
- return FALSE;
-
- g_atomic_int_inc (&req->ref);
-
- mutex = &req->priv->nice->mutex;
+ agent_lock ();
- g_static_rec_mutex_lock (mutex);
+ if (g_source_is_destroyed (g_main_current_source ())) {
+ nice_debug ("Source was destroyed. "
+ "Avoided race condition in turn.c:priv_forget_send_request");
+ agent_unlock ();
+ return FALSE;
+ }
- if (req->source) {
- stun_agent_forget_transaction (&req->priv->agent, req->id);
+ stun_agent_forget_transaction (&req->priv->agent, req->id);
- if (g_queue_index (req->priv->send_requests, req) != -1) {
- g_queue_remove (req->priv->send_requests, req);
- (void)g_atomic_int_dec_and_test (&req->ref);
- }
+ g_queue_remove (req->priv->send_requests, req);
- g_source_destroy (req->source);
- g_source_unref (req->source);
- req->source = NULL;
- }
+ g_source_destroy (req->source);
+ g_source_unref (req->source);
+ req->source = NULL;
- g_static_rec_mutex_unlock (mutex);
+ agent_unlock ();
- if (g_atomic_int_dec_and_test (&req->ref))
- g_slice_free (SendRequest, req);
+ g_slice_free (SendRequest, req);
return FALSE;
}
@@ -430,8 +419,7 @@
g_queue_remove (priv->send_requests, req);
- if (g_atomic_int_dec_and_test (&req->ref))
- g_slice_free (SendRequest, req);
+ g_slice_free (SendRequest, req);
}
if (priv->compatibility == NICE_TURN_SOCKET_COMPATIBILITY_GOOGLE) {
@@ -658,7 +646,14 @@
TurnPriv *priv = pointer;
gboolean ret;
- g_static_rec_mutex_lock (&priv->nice->mutex);
+ agent_lock ();
+ if (g_source_is_destroyed (g_main_current_source ())) {
+ nice_debug ("Source was destroyed. "
+ "Avoided race condition in turn.c:priv_retransmissions_tick");
+ agent_unlock ();
+ return FALSE;
+ }
+
ret = priv_retransmissions_tick_unlocked (priv);
if (ret == FALSE) {
if (priv->tick_source != NULL) {
@@ -667,7 +662,7 @@
priv->tick_source = NULL;
}
}
- g_static_rec_mutex_unlock (&priv->nice->mutex);
+ agent_unlock ();
return ret;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libnice-0.0.7/stun/stunmessage.c new/libnice-0.0.8/stun/stunmessage.c
--- old/libnice-0.0.7/stun/stunmessage.c 2009-03-09 21:34:55.000000000 +0100
+++ new/libnice-0.0.8/stun/stunmessage.c 2009-06-18 18:57:48.000000000 +0200
@@ -126,7 +126,7 @@
stun_message_find_flag (const StunMessage *msg, StunAttribute type)
{
const void *ptr;
- uint16_t len;
+ uint16_t len = 0;
ptr = stun_message_find (msg, type, &len);
if (ptr == NULL)
@@ -141,7 +141,7 @@
uint32_t *pval)
{
const void *ptr;
- uint16_t len;
+ uint16_t len = 0;
ptr = stun_message_find (msg, type, &len);
if (ptr == NULL)
@@ -164,7 +164,7 @@
uint64_t *pval)
{
const void *ptr;
- uint16_t len;
+ uint16_t len = 0;
ptr = stun_message_find (msg, type, &len);
if (ptr == NULL)
@@ -187,7 +187,7 @@
char *buf, size_t buflen)
{
const unsigned char *ptr;
- uint16_t len;
+ uint16_t len = 0;
ptr = stun_message_find (msg, type, &len);
if (ptr == NULL)
@@ -207,7 +207,7 @@
struct sockaddr *addr, socklen_t *addrlen)
{
const uint8_t *ptr;
- uint16_t len;
+ uint16_t len = 0;
ptr = stun_message_find (msg, type, &len);
if (ptr == NULL)
@@ -289,7 +289,7 @@
StunMessageReturn
stun_message_find_error (const StunMessage *msg, int *code)
{
- uint16_t alen;
+ uint16_t alen = 0;
const uint8_t *ptr = stun_message_find (msg, STUN_ATTRIBUTE_ERROR_CODE, &alen);
uint8_t class, number;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org