Hello community, here is the log from the commit of package gupnp-igd for openSUSE:Factory checked in at Tue Dec 8 11:39:25 CET 2009. -------- --- GNOME/gupnp-igd/gupnp-igd.changes 2009-06-13 23:43:15.000000000 +0200 +++ /mounts/work_src_done/STABLE/gupnp-igd/gupnp-igd.changes 2009-12-07 10:34:52.000000000 +0100 @@ -1,0 +2,15 @@ +Mon Dec 7 09:19:28 CET 2009 - vuntz@opensuse.org + +- Update to version 0.1.5: + + Use the new GUPnP Context Manager from GUPnP 0.13 +- Rename libgupnp-igd-1_0-2 to libgupnp-igd-1_0-3 to follow soname + bump. + +------------------------------------------------------------------- +Mon Nov 30 20:13:14 CET 2009 - dimstar@opensuse.org + +- Update to version 0.1.4: + + Make it compatible with the 0.13 API + + Bug fixes + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- gupnp-igd-0.1.3.tar.bz2 New: ---- gupnp-igd-0.1.5.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gupnp-igd.spec ++++++ --- /var/tmp/diff_new_pack.H6kftD/_old 2009-12-08 11:37:56.000000000 +0100 +++ /var/tmp/diff_new_pack.H6kftD/_new 2009-12-08 11:37:56.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package gupnp-igd (Version 0.1.3) +# spec file for package gupnp-igd (Version 0.1.5) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -18,10 +18,10 @@ Name: gupnp-igd -Version: 0.1.3 -Release: 2 +Version: 0.1.5 +Release: 1 Summary: Library to handle UPnP IGD port mapping -License: LGPL v2.1 or later +License: LGPLv2.1+ Group: Development/Libraries/C and C++ Url: http://www.gupnp.org/ Source: %{name}-%{version}.tar.bz2 @@ -32,20 +32,20 @@ gupnp-igd is a library to handle UPnP IGD port mapping. It is supposed to have a very simple API. -%package -n libgupnp-igd-1_0-2 -License: LGPL v2.1 or later +%package -n libgupnp-igd-1_0-3 +License: LGPLv2.1+ Summary: Library to handle UPnP IGD port mapping Group: Development/Libraries/C and C++ -%description -n libgupnp-igd-1_0-2 +%description -n libgupnp-igd-1_0-3 gupnp-igd is a library to handle UPnP IGD port mapping. It is supposed to have a very simple API. %package -n libgupnp-igd-devel -License: LGPL v2.1 or later +License: LGPLv2.1+ Summary: Library to handle UPnP IGD port mapping - Development Files Group: Development/Libraries/C and C++ -Requires: libgupnp-igd-1_0-2 = %{version} +Requires: libgupnp-igd-1_0-3 = %{version} Requires: libgupnp-devel %description -n libgupnp-igd-devel @@ -66,11 +66,11 @@ %clean rm -rf %{buildroot} -%post -n libgupnp-igd-1_0-2 -p /sbin/ldconfig +%post -n libgupnp-igd-1_0-3 -p /sbin/ldconfig -%postun -n libgupnp-igd-1_0-2 -p /sbin/ldconfig +%postun -n libgupnp-igd-1_0-3 -p /sbin/ldconfig -%files -n libgupnp-igd-1_0-2 +%files -n libgupnp-igd-1_0-3 %defattr(-,root,root) %doc AUTHORS COPYING NEWS README %{_libdir}/*.so.* ++++++ gupnp-igd-0.1.3.tar.bz2 -> gupnp-igd-0.1.5.tar.bz2 ++++++ ++++ 52462 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/gupnp-igd-0.1.3/NEWS new/gupnp-igd-0.1.5/NEWS --- old/gupnp-igd-0.1.3/NEWS 2009-06-09 02:26:27.000000000 +0200 +++ new/gupnp-igd-0.1.5/NEWS 2009-12-05 11:10:00.000000000 +0100 @@ -1,5 +1,18 @@ ******************* +* GUPnP IGD 0.1.5 * +******************* + +- Use the new GUPnP Context Manager from GUPnP 0.13 + +******************* +* GUPnP IGD 0.1.4 * +******************* + +- Make it compatible with the 0.13 API (does not yet use GUPnPContextManager) +- Bug fixes + +******************* * GUPnP IGD 0.1.3 * ******************* 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/gupnp-igd-0.1.3/config.h.in new/gupnp-igd-0.1.5/config.h.in --- old/gupnp-igd-0.1.3/config.h.in 2009-06-09 02:27:24.000000000 +0200 +++ new/gupnp-igd-0.1.5/config.h.in 2009-12-05 09:29:58.000000000 +0100 @@ -36,6 +36,10 @@ /* Define to 1 if you have theheader file. */ #undef HAVE_UNISTD_H +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + /* Name of package */ #undef PACKAGE 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/gupnp-igd-0.1.3/configure.ac new/gupnp-igd-0.1.5/configure.ac --- old/gupnp-igd-0.1.3/configure.ac 2009-06-09 02:26:27.000000000 +0200 +++ new/gupnp-igd-0.1.5/configure.ac 2009-12-05 09:29:37.000000000 +0100 @@ -1,5 +1,5 @@ AC_PREREQ(2.53) -AC_INIT(gupnp-igd, 0.1.3, http://www.gupnp.org/) +AC_INIT(gupnp-igd, 0.1.5, http://www.gupnp.org/) AM_INIT_AUTOMAKE() AC_CONFIG_SRCDIR(libgupnp-igd/gupnp-simple-igd.h) AM_CONFIG_HEADER(config.h) @@ -10,7 +10,7 @@ AC_PROG_LIBTOOL AC_FUNC_MMAP -PKG_CHECK_MODULES(LIBGUPNP, glib-2.0 >= 2.14 gupnp-1.0 >= 0.12.3 gthread-2.0) +PKG_CHECK_MODULES(LIBGUPNP, glib-2.0 >= 2.14 gupnp-1.0 >= 0.13.2 gthread-2.0) # glib-genmarshal GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0` 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/gupnp-igd-0.1.3/doc/html/GUPnPSimpleIgd.html new/gupnp-igd-0.1.5/doc/html/GUPnPSimpleIgd.html --- old/gupnp-igd-0.1.3/doc/html/GUPnPSimpleIgd.html 2009-06-09 02:28:29.000000000 +0200 +++ new/gupnp-igd-0.1.5/doc/html/GUPnPSimpleIgd.html 2009-12-05 11:10:35.000000000 +0100 @@ -3,8 +3,8 @@ GUPnPSimpleIgd - - + + @@ -33,7 +33,7 @@ Signals -+-
@@ -42,7 +42,7 @@ +-Synopsis
GUPnPSimpleIgd; @@ -52,9 +52,7 @@ GUPnPSimpleIgd * gupnp_simple_igd_new (GMainContext *main_context); -void gupnp_simple_igd_add_port (GUPnPSimpleIgd *self, +void gupnp_simple_igd_add_port (GUPnPSimpleIgd *self, const gchar *protocol, @@ -73,9 +71,7 @@ const gchar *description); -void gupnp_simple_igd_remove_port (GUPnPSimpleIgd *self, +void gupnp_simple_igd_remove_port (GUPnPSimpleIgd *self, const gchar *protocol, @@ -84,7 +80,7 @@ >guint external_port);+ -+-Properties
"main-context" gpointer : Read / Write / Construct Only - "request-timeout" guint : Read / Write+ -+ -+Details
-+
-
-+-GUPNP_SIMPLE_IGD_ERROR
#define GUPNP_SIMPLE_IGD_ERROR (gupnp_simple_igd_get_error_domain ())@@ -193,7 +186,7 @@
-+
-+
-+gupnp_simple_igd_add_port ()
-void gupnp_simple_igd_add_port (GUPnPSimpleIgd *self, +void gupnp_simple_igd_add_port (GUPnPSimpleIgd *self, const gchar *protocol, @@ -322,11 +313,9 @@
-+gupnp_simple_igd_remove_port ()
-void gupnp_simple_igd_remove_port (GUPnPSimpleIgd *self, +void gupnp_simple_igd_remove_port (GUPnPSimpleIgd *self, const gchar *protocol, @@ -364,32 +353,21 @@+Property Details
-+--The
"main-context"
property"main-context" gpointer : Read / Write / Construct OnlyThis GMainContext will be used for all async activities.
--The
-"request-timeout"
property"request-timeout" guint : Read / Write-After this timeout, the request is considered to have failed andis dropped (in seconds).
-Default value: 5
-+Signal Details
-+The
-"error-mapping-port"
signalvoid user_function (GUPnPSimpleIgd *self, +void user_function (GUPnPSimpleIgd *self, gpointer error, @@ -464,11 +442,9 @@
-+The
-"mapped-external-port"
signalvoid user_function (GUPnPSimpleIgd *self, +void user_function (GUPnPSimpleIgd *self, gchar *proto, 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/gupnp-igd-0.1.3/doc/html/GUPnPSimpleIgdThread.html new/gupnp-igd-0.1.5/doc/html/GUPnPSimpleIgdThread.html --- old/gupnp-igd-0.1.3/doc/html/GUPnPSimpleIgdThread.html 2009-06-09 02:28:29.000000000 +0200 +++ new/gupnp-igd-0.1.5/doc/html/GUPnPSimpleIgdThread.html 2009-12-05 11:10:35.000000000 +0100 @@ -3,8 +3,8 @@GUPnPSimpleIgdThread - - + + @@ -28,7 +28,7 @@ Object Hierarchy -+-
@@ -37,7 +37,7 @@ +-Synopsis
GUPnPSimpleIgdThread; @@ -45,7 +45,7 @@ GUPnPSimpleIgdThread * gupnp_simple_igd_thread_new (void);+ -+-Description
This wraps a GUPnPSimpleIgd into a thread so that it can be used without @@ -65,9 +65,9 @@
+Details
-+
-
-+gupnp_simple_igd_thread_new ()
GUPnPSimpleIgdThread * gupnp_simple_igd_thread_new (void);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/gupnp-igd-0.1.3/doc/html/ch01.html new/gupnp-igd-0.1.5/doc/html/ch01.html --- old/gupnp-igd-0.1.3/doc/html/ch01.html 2009-06-09 02:28:29.000000000 +0200 +++ new/gupnp-igd-0.1.5/doc/html/ch01.html 2009-12-05 11:10:35.000000000 +0100 @@ -3,8 +3,8 @@
Simple IGD module - - + + @@ -20,9 +20,9 @@GUPnP IGD Reference Manual -
- GUPnPSimpleIgd — A simple class to map ports on UPnP routers 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/gupnp-igd-0.1.3/doc/html/gupnp-igd.devhelp new/gupnp-igd-0.1.5/doc/html/gupnp-igd.devhelp --- old/gupnp-igd-0.1.3/doc/html/gupnp-igd.devhelp 2009-06-09 02:28:29.000000000 +0200 +++ new/gupnp-igd-0.1.5/doc/html/gupnp-igd.devhelp 2009-12-05 11:10:35.000000000 +0100 @@ -16,7 +16,6 @@
- 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/gupnp-igd-0.1.3/doc/html/gupnp-igd.devhelp2 new/gupnp-igd-0.1.5/doc/html/gupnp-igd.devhelp2 --- old/gupnp-igd-0.1.3/doc/html/gupnp-igd.devhelp2 2009-06-09 02:28:29.000000000 +0200 +++ new/gupnp-igd-0.1.5/doc/html/gupnp-igd.devhelp2 2009-12-05 11:10:35.000000000 +0100 @@ -16,7 +16,6 @@ - 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/gupnp-igd-0.1.3/doc/html/index.html new/gupnp-igd-0.1.5/doc/html/index.html --- old/gupnp-igd-0.1.3/doc/html/index.html 2009-06-09 02:28:29.000000000 +0200 +++ new/gupnp-igd-0.1.5/doc/html/index.html 2009-12-05 11:10:35.000000000 +0100 @@ -3,20 +3,20 @@ GUPnP IGD Reference Manual - - + + -+
GUPnP IGD Reference Manual
- for gupnp-igd 0.1.3 + for gupnp-igd 0.1.5
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/gupnp-igd-0.1.3/doc/html/index.sgml new/gupnp-igd-0.1.5/doc/html/index.sgml --- old/gupnp-igd-0.1.3/doc/html/index.sgml 2009-06-09 02:28:29.000000000 +0200 +++ new/gupnp-igd-0.1.5/doc/html/index.sgml 2009-12-05 11:10:35.000000000 +0100 @@ -14,7 +14,6 @@Copyright © 2008 Collabora Ltd, Nokia Corp
- 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/gupnp-igd-0.1.3/doc/tmpl/gupnp-igd-unused.sgml new/gupnp-igd-0.1.5/doc/tmpl/gupnp-igd-unused.sgml --- old/gupnp-igd-0.1.3/doc/tmpl/gupnp-igd-unused.sgml 2009-06-09 02:28:29.000000000 +0200 +++ new/gupnp-igd-0.1.5/doc/tmpl/gupnp-igd-unused.sgml 2009-12-05 11:10:35.000000000 +0100 @@ -0,0 +1,6 @@ + + + + + + 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/gupnp-igd-0.1.3/doc/tmpl/gupnp-simple-igd.sgml new/gupnp-igd-0.1.5/doc/tmpl/gupnp-simple-igd.sgml --- old/gupnp-igd-0.1.3/doc/tmpl/gupnp-simple-igd.sgml 2009-06-09 02:28:29.000000000 +0200 +++ new/gupnp-igd-0.1.5/doc/tmpl/gupnp-simple-igd.sgml 2009-12-05 11:10:35.000000000 +0100 @@ -33,8 +33,8 @@ @arg2: @arg3: @arg4: -@Param6: -@Param7: +@arg5: +@arg6:@@ -54,11 +54,6 @@ - - - - - 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/gupnp-igd-0.1.3/doc/version.xml new/gupnp-igd-0.1.5/doc/version.xml --- old/gupnp-igd-0.1.3/doc/version.xml 2009-06-09 02:27:23.000000000 +0200 +++ new/gupnp-igd-0.1.5/doc/version.xml 2009-12-05 09:29:49.000000000 +0100 @@ -1 +1 @@ -0.1.3 +0.1.5 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/gupnp-igd-0.1.3/doc/xml/api-index-full.xml new/gupnp-igd-0.1.5/doc/xml/api-index-full.xml --- old/gupnp-igd-0.1.3/doc/xml/api-index-full.xml 2009-06-09 02:28:29.000000000 +0200 +++ new/gupnp-igd-0.1.5/doc/xml/api-index-full.xml 2009-12-05 11:10:35.000000000 +0100 @@ -9,7 +9,6 @@ GUPnPSimpleIgd::error-mapping-port GUPnPSimpleIgd::mapped-external-port - GUPnPSimpleIgd:main-context GUPnPSimpleIgd:request-timeout GUPnPSimpleIgdClass GUPnPSimpleIgdError 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/gupnp-igd-0.1.3/doc/xml/gupnp-simple-igd.xml new/gupnp-igd-0.1.5/doc/xml/gupnp-simple-igd.xml --- old/gupnp-igd-0.1.3/doc/xml/gupnp-simple-igd.xml 2009-06-09 02:28:29.000000000 +0200 +++ new/gupnp-igd-0.1.5/doc/xml/gupnp-simple-igd.xml 2009-12-05 11:10:35.000000000 +0100 @@ -54,7 +54,6 @@ GUPnPSimpleIgdThread Properties "main-context" gpointer : Read / Write / Construct Only - "request-timeout" guint : Read / Write @@ -242,10 +241,6 @@- The "main-context" propertyGUPnPSimpleIgd:main-context "main-context" gpointer : Read / Write / Construct Only This GMainContext will be used for all async activities. The -"request-timeout" propertyGUPnPSimpleIgd:request-timeout "request-timeout" guint : Read / Write -After this timeout, the request is considered to have failed andis dropped (in seconds). Default value: 5 -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/gupnp-igd-0.1.3/libgupnp-igd/Makefile.am new/gupnp-igd-0.1.5/libgupnp-igd/Makefile.am --- old/gupnp-igd-0.1.3/libgupnp-igd/Makefile.am 2009-06-09 02:26:54.000000000 +0200 +++ new/gupnp-igd-0.1.5/libgupnp-igd/Makefile.am 2009-12-05 09:29:37.000000000 +0100 @@ -4,7 +4,7 @@ # interfaces added -> increment AGE # interfaces removed -> AGE = 0 -LTVERSION = 2:1:0 +LTVERSION = 3:1:0 AM_CFLAGS = $(LIBGUPNP_CFLAGS) -I$(top_srcdir) @@ -40,6 +40,7 @@ mv $@.tmp $@ libgupnp_igd_1_0_la_LDFLAGS = -version-info $(LTVERSION) \ + -export-symbols-regex ^gupnp_ \ $(GUPNP_LDFLAGS) libgupnp_igd_1_0_la_LIBADD = \ 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/gupnp-igd-0.1.3/libgupnp-igd/gupnp-simple-igd-thread.c new/gupnp-igd-0.1.5/libgupnp-igd/gupnp-simple-igd-thread.c --- old/gupnp-igd-0.1.3/libgupnp-igd/gupnp-simple-igd-thread.c 2009-06-09 02:26:24.000000000 +0200 +++ new/gupnp-igd-0.1.5/libgupnp-igd/gupnp-simple-igd-thread.c 2009-11-12 22:40:12.000000000 +0100 @@ -54,6 +54,8 @@ GCond *can_dispose_cond; struct thread_data *thread_data; + + GPtrArray *add_remove_port_datas; }; @@ -85,6 +87,19 @@ const gchar *protocol, guint external_port); + +struct AddRemovePortData { + GStaticMutex mutex; + GUPnPSimpleIgdThread *self G_GNUC_MAY_ALIAS; /* protected by mutex */ + gchar *protocol; + guint16 external_port; + gchar *local_ip; + guint16 local_port; + guint32 lease_duration; + gchar *description; +}; + + static void gupnp_simple_igd_thread_class_init (GUPnPSimpleIgdThreadClass *klass) { @@ -110,6 +125,8 @@ self->priv->context = g_main_context_new (); self->priv->can_dispose_cond = g_cond_new (); + self->priv->add_remove_port_datas = g_ptr_array_new (); + g_object_set (self, "main-context", self->priv->context, NULL); } @@ -137,6 +154,15 @@ GUPnPSimpleIgdThread *self = GUPNP_SIMPLE_IGD_THREAD_CAST (object); GUPNP_SIMPLE_IGD_THREAD_LOCK (self); + while (self->priv->add_remove_port_datas->len) + { + struct AddRemovePortData *data = + g_ptr_array_remove_index (self->priv->add_remove_port_datas, 0); + g_static_mutex_lock (&data->mutex); + data->self = NULL; + g_static_mutex_unlock (&data->mutex); + } + if (g_thread_self () == self->priv->thread) { GUPNP_SIMPLE_IGD_THREAD_UNLOCK (self); @@ -149,7 +175,7 @@ g_main_loop_quit (self->priv->thread_data->loop); GUPNP_SIMPLE_IGD_THREAD_UNLOCK (self); } - else + else if (self->priv->thread) { GSource *stop_src; GSource *delete_all_src; @@ -204,6 +230,8 @@ g_main_context_unref (self->priv->context); g_cond_free (self->priv->can_dispose_cond); + g_ptr_array_free (self->priv->add_remove_port_datas, TRUE); + thread_data_dec (self->priv->thread_data); G_OBJECT_CLASS (gupnp_simple_igd_thread_parent_class)->finalize (object); @@ -254,31 +282,30 @@ g_return_if_fail (self->priv->thread); } -struct AddRemovePortData { - GUPnPSimpleIgd *self G_GNUC_MAY_ALIAS; - gchar *protocol; - guint16 external_port; - gchar *local_ip; - guint16 local_port; - guint32 lease_duration; - gchar *description; -}; - static gboolean add_port_idle_func (gpointer user_data) { struct AddRemovePortData *data = user_data; GUPnPSimpleIgdClass *klass = GUPNP_SIMPLE_IGD_CLASS (gupnp_simple_igd_thread_parent_class); + GUPnPSimpleIgdThread *self; - if (!data->self) + g_static_mutex_lock (&data->mutex); + self = data->self; + if (self) + g_object_ref (self); + g_static_mutex_unlock (&data->mutex); + if (!self) return FALSE; if (klass->add_port) - klass->add_port (data->self, data->protocol, data->external_port, - data->local_ip, data->local_port, data->lease_duration, + klass->add_port (GUPNP_SIMPLE_IGD (self), data->protocol, + data->external_port, data->local_ip, data->local_port, + data->lease_duration, data->description); + g_object_unref (self); + return FALSE; } @@ -289,12 +316,21 @@ struct AddRemovePortData *data = user_data; GUPnPSimpleIgdClass *klass = GUPNP_SIMPLE_IGD_CLASS (gupnp_simple_igd_thread_parent_class); + GUPnPSimpleIgdThread *self; - if (!data->self) + g_static_mutex_lock (&data->mutex); + self = data->self; + if (self) + g_object_ref (self); + g_static_mutex_unlock (&data->mutex); + if (!self) return FALSE; if (klass->remove_port) - klass->remove_port (data->self, data->protocol, data->external_port); + klass->remove_port (GUPNP_SIMPLE_IGD (self), data->protocol, + data->external_port); + + g_object_unref (self); return FALSE; } @@ -303,10 +339,22 @@ free_add_remove_port_data (gpointer user_data) { struct AddRemovePortData *data = user_data; + GUPnPSimpleIgdThread *self; + + g_static_mutex_lock (&data->mutex); + self = data->self; + data->self = NULL; + if (self) + g_object_ref (self); + g_static_mutex_unlock (&data->mutex); + if (self) + { + GUPNP_SIMPLE_IGD_THREAD_LOCK (self); + g_ptr_array_remove_fast (self->priv->add_remove_port_datas, data); + GUPNP_SIMPLE_IGD_THREAD_UNLOCK (self); + g_object_unref (self); + } - if (data->self) - g_object_remove_weak_pointer (G_OBJECT (data->self), - (gpointer*) &data->self); g_free (data->protocol); g_free (data->local_ip); g_free (data->description); @@ -327,16 +375,19 @@ struct AddRemovePortData *data = g_slice_new0 (struct AddRemovePortData); GSource *source; - data->self = self; + g_static_mutex_init (&data->mutex); + data->self = realself; data->protocol = g_strdup (protocol); data->external_port = external_port; data->local_ip = g_strdup (local_ip); data->local_port = local_port; data->lease_duration = lease_duration; data->description = g_strdup (description); + GUPNP_SIMPLE_IGD_THREAD_LOCK (realself); + g_ptr_array_add (realself->priv->add_remove_port_datas, data); + GUPNP_SIMPLE_IGD_THREAD_UNLOCK (realself); source = g_idle_source_new (); - g_object_add_weak_pointer (G_OBJECT (self), (gpointer*) &data->self); g_source_set_callback (source, add_port_idle_func, data, free_add_remove_port_data); g_source_set_priority (source, G_PRIORITY_DEFAULT); @@ -354,12 +405,15 @@ struct AddRemovePortData *data = g_slice_new0 (struct AddRemovePortData); GSource *source; - data->self = self; + g_static_mutex_init (&data->mutex); + data->self = realself; data->protocol = g_strdup (protocol); data->external_port = external_port; + GUPNP_SIMPLE_IGD_THREAD_LOCK (realself); + g_ptr_array_add (realself->priv->add_remove_port_datas, data); + GUPNP_SIMPLE_IGD_THREAD_UNLOCK (realself); source = g_idle_source_new (); - g_object_add_weak_pointer (G_OBJECT (self), (gpointer*) &data->self); g_source_set_callback (source, remove_port_idle_func, data, free_add_remove_port_data); g_source_set_priority (source, G_PRIORITY_DEFAULT); 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/gupnp-igd-0.1.3/libgupnp-igd/gupnp-simple-igd.c new/gupnp-igd-0.1.5/libgupnp-igd/gupnp-simple-igd.c --- old/gupnp-igd-0.1.3/libgupnp-igd/gupnp-simple-igd.c 2009-06-09 02:26:24.000000000 +0200 +++ new/gupnp-igd-0.1.5/libgupnp-igd/gupnp-simple-igd.c 2009-12-05 09:29:24.000000000 +0100 @@ -37,32 +37,27 @@ #include -#include +#include +#define SOUP_REQUEST_TIMEOUT 5 struct _GUPnPSimpleIgdPrivate { GMainContext *main_context; - GUPnPContext *gupnp_context; - GUPnPControlPoint *ip_cp; - GUPnPControlPoint *ppp_cp; + GUPnPContextManager *gupnp_context_manager; GPtrArray *service_proxies; - GPtrArray *mappings; - gulong ip_avail_handler; - gulong ip_unavail_handler; - - gulong ppp_avail_handler; - gulong ppp_unavail_handler; + gboolean no_new_mappings; guint deleting_count; }; struct Proxy { GUPnPSimpleIgd *parent; + GUPnPControlPoint *cp; GUPnPServiceProxy *proxy; gchar *external_ip; @@ -105,7 +100,6 @@ enum { PROP_0, - PROP_REQUEST_TIMEOUT, PROP_MAIN_CONTEXT }; @@ -175,15 +169,6 @@ klass->remove_port = gupnp_simple_igd_remove_port_real; g_object_class_install_property (gobject_class, - PROP_REQUEST_TIMEOUT, - g_param_spec_uint ("request-timeout", - "The timeout after which a request is considered to have failed", - "After this timeout, the request is considered to have failed and" - "is dropped (in seconds).", - 0, G_MAXUINT, 5, - G_PARAM_READWRITE)); - - g_object_class_install_property (gobject_class, PROP_MAIN_CONTEXT, g_param_spec_pointer ("main-context", "The GMainContext to use", @@ -262,25 +247,7 @@ gboolean gupnp_simple_igd_delete_all_mappings (GUPnPSimpleIgd *self) { - if (self->priv->ip_avail_handler) - g_signal_handler_disconnect (self->priv->ip_cp, - self->priv->ip_avail_handler); - self->priv->ip_avail_handler = 0; - - if (self->priv->ip_unavail_handler) - g_signal_handler_disconnect (self->priv->ip_cp, - self->priv->ip_unavail_handler); - self->priv->ip_unavail_handler = 0; - - if (self->priv->ppp_avail_handler) - g_signal_handler_disconnect (self->priv->ppp_cp, - self->priv->ppp_avail_handler); - self->priv->ppp_avail_handler = 0; - - if (self->priv->ppp_unavail_handler) - g_signal_handler_disconnect (self->priv->ppp_cp, - self->priv->ppp_unavail_handler); - self->priv->ppp_unavail_handler = 0; + self->priv->no_new_mappings = TRUE; while (self->priv->mappings->len) { @@ -299,24 +266,15 @@ if (!gupnp_simple_igd_delete_all_mappings (self)) return; - while (self->priv->service_proxies->len) - { - free_proxy (g_ptr_array_index (self->priv->service_proxies, 0)); - g_ptr_array_remove_index_fast (self->priv->service_proxies, 0); + if (self->priv->gupnp_context_manager) + g_object_unref (self->priv->gupnp_context_manager); + self->priv->gupnp_context_manager = NULL; + + if (self->priv->service_proxies) { + g_ptr_array_foreach (self->priv->service_proxies, (GFunc) free_proxy, NULL); + g_ptr_array_free (self->priv->service_proxies, TRUE); } - if (self->priv->ip_cp) - g_object_unref (self->priv->ip_cp); - self->priv->ip_cp = NULL; - - if (self->priv->ppp_cp) - g_object_unref (self->priv->ppp_cp); - self->priv->ppp_cp = NULL; - - if (self->priv->gupnp_context) - g_object_unref (self->priv->gupnp_context); - self->priv->gupnp_context = NULL; - G_OBJECT_CLASS (gupnp_simple_igd_parent_class)->dispose (object); } @@ -409,7 +367,6 @@ g_ptr_array_foreach (prox->proxymappings, (GFunc) free_proxymapping, NULL); g_ptr_array_free (prox->proxymappings, TRUE); - g_object_unref (prox->proxy); g_free (prox->external_ip); g_slice_free (struct Proxy, prox); } @@ -448,9 +405,6 @@ g_main_context_unref (self->priv->main_context); - g_warn_if_fail (self->priv->service_proxies->len == 0); - g_ptr_array_free (self->priv->service_proxies, TRUE); - g_warn_if_fail (self->priv->mappings->len == 0); g_ptr_array_free (self->priv->mappings, TRUE); @@ -464,13 +418,6 @@ GUPnPSimpleIgd *self = GUPNP_SIMPLE_IGD_CAST (object); switch (prop_id) { - case PROP_REQUEST_TIMEOUT: - { - SoupSession *session; - session = gupnp_context_get_session (self->priv->gupnp_context); - g_object_get_property (G_OBJECT (session), "timeout", value); - } - break; case PROP_MAIN_CONTEXT: g_value_set_pointer (value, self->priv->main_context); break; @@ -488,13 +435,6 @@ GUPnPSimpleIgd *self = GUPNP_SIMPLE_IGD_CAST (object); switch (prop_id) { - case PROP_REQUEST_TIMEOUT: - { - SoupSession *session; - session = gupnp_context_get_session (self->priv->gupnp_context); - g_object_set_property (G_OBJECT (session), "timeout", value); - } - break; case PROP_MAIN_CONTEXT: if (!self->priv->main_context && g_value_get_pointer (value)) { @@ -513,11 +453,17 @@ GUPnPServiceProxy *proxy, GUPnPSimpleIgd *self) { - struct Proxy *prox = g_slice_new0 (struct Proxy); + struct Proxy *prox; guint i; + if (self->priv->no_new_mappings) + return; + + prox = g_slice_new0 (struct Proxy); + prox->parent = self; - prox->proxy = g_object_ref (proxy); + prox->cp = cp; + prox->proxy = proxy; prox->proxymappings = g_ptr_array_new (); gupnp_simple_igd_gather (self, prox); @@ -539,10 +485,10 @@ for (i=0; i < self->priv->service_proxies->len; i++) { - struct Proxy *prox = - g_ptr_array_index (self->priv->service_proxies, i); + struct Proxy *prox = g_ptr_array_index (self->priv->service_proxies, i); - if (!strcmp (gupnp_service_info_get_udn (GUPNP_SERVICE_INFO (prox->proxy)), + if (prox->cp == cp && + !strcmp (gupnp_service_info_get_udn (GUPNP_SERVICE_INFO (proxy)), gupnp_service_info_get_udn (GUPNP_SERVICE_INFO (prox->proxy)))) { free_proxy (prox); @@ -552,52 +498,56 @@ } } +static void +gupnp_simple_igd_add_control_point (GUPnPSimpleIgd *self, + GUPnPContext *gupnp_context, const char *target) +{ + GUPnPControlPoint *cp; + + cp = gupnp_control_point_new (gupnp_context, target); + g_return_if_fail (cp); + + g_signal_connect_object (cp, "service-proxy-available", + G_CALLBACK (_cp_service_avail), self, 0); + g_signal_connect_object (cp, "service-proxy-unavailable", + G_CALLBACK (_cp_service_unavail), self, 0); + + gssdp_resource_browser_set_active (GSSDP_RESOURCE_BROWSER (cp), TRUE); + + gupnp_context_manager_manage_control_point ( + self->priv->gupnp_context_manager, cp); +} static void -gupnp_simple_igd_constructed (GObject *object) +_context_available (GUPnPContextManager *manager, GUPnPContext *gupnp_context, + GUPnPSimpleIgd *self) { - GUPnPSimpleIgd *self = GUPNP_SIMPLE_IGD_CAST (object); SoupSession *session; - if (!self->priv->main_context) - self->priv->main_context = g_main_context_ref (g_main_context_default ()); + session = gupnp_context_get_session (gupnp_context); + g_object_set (session, "timeout", SOUP_REQUEST_TIMEOUT, NULL); - self->priv->gupnp_context = gupnp_context_new (self->priv->main_context, - NULL, 0, NULL); - g_return_if_fail (self->priv->gupnp_context); + gupnp_simple_igd_add_control_point (self, gupnp_context, + "urn:schemas-upnp-org:service:WANIPConnection:1"); + gupnp_simple_igd_add_control_point (self, gupnp_context, + "urn:schemas-upnp-org:service:WANPPPConnection:1"); +} - session = gupnp_context_get_session (self->priv->gupnp_context); - g_object_set (session, "timeout", 5, NULL); - self->priv->ip_cp = gupnp_control_point_new (self->priv->gupnp_context, - "urn:schemas-upnp-org:service:WANIPConnection:1"); - g_return_if_fail (self->priv->ip_cp); +static void +gupnp_simple_igd_constructed (GObject *object) +{ + GUPnPSimpleIgd *self = GUPNP_SIMPLE_IGD_CAST (object); + SoupSession *session; - self->priv->ip_avail_handler = g_signal_connect (self->priv->ip_cp, - "service-proxy-available", - G_CALLBACK (_cp_service_avail), self); - self->priv->ip_unavail_handler = g_signal_connect (self->priv->ip_cp, - "service-proxy-unavailable", - G_CALLBACK (_cp_service_unavail), self); + if (!self->priv->main_context) + self->priv->main_context = g_main_context_ref (g_main_context_default ()); - self->priv->ppp_cp = gupnp_control_point_new (self->priv->gupnp_context, - "urn:schemas-upnp-org:service:WANPPPConnection:1"); - g_return_if_fail (self->priv->ppp_cp); + self->priv->gupnp_context_manager = + gupnp_context_manager_new (self->priv->main_context, 0); - self->priv->ppp_avail_handler = g_signal_connect (self->priv->ppp_cp, - "service-proxy-available", - G_CALLBACK (_cp_service_avail), self); - self->priv->ppp_unavail_handler = g_signal_connect (self->priv->ppp_cp, - "service-proxy-unavailable", - G_CALLBACK (_cp_service_unavail), self); - - - gssdp_resource_browser_set_active ( - GSSDP_RESOURCE_BROWSER (self->priv->ip_cp), - TRUE); - gssdp_resource_browser_set_active ( - GSSDP_RESOURCE_BROWSER (self->priv->ppp_cp), - TRUE); + g_signal_connect (self->priv->gupnp_context_manager, "context-available", + G_CALLBACK (_context_available), self); if (G_OBJECT_CLASS (gupnp_simple_igd_parent_class)->constructed) G_OBJECT_CLASS (gupnp_simple_igd_parent_class)->constructed (object); 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/gupnp-igd-0.1.3/tests/gtest/Makefile.am new/gupnp-igd-0.1.5/tests/gtest/Makefile.am --- old/gupnp-igd-0.1.3/tests/gtest/Makefile.am 2009-04-29 01:58:51.000000000 +0200 +++ new/gupnp-igd-0.1.5/tests/gtest/Makefile.am 2009-06-10 22:40:59.000000000 +0200 @@ -2,6 +2,7 @@ if HAVE_GTEST TESTS_ENVIRONMENT = XML_PATH=$(srcdir) \ + G_SLICE=debug-blocks \ LD_LIBRARY_PATH=$(top_builddir)/libgupnp-igd/.libs TESTS = $(check_PROGRAMS) 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/gupnp-igd-0.1.3/tests/gtest/gupnp-simple-igd.c new/gupnp-igd-0.1.5/tests/gtest/gupnp-simple-igd.c --- old/gupnp-igd-0.1.3/tests/gtest/gupnp-simple-igd.c 2009-06-09 02:26:24.000000000 +0200 +++ new/gupnp-igd-0.1.5/tests/gtest/gupnp-simple-igd.c 2009-12-05 09:29:24.000000000 +0100 @@ -227,14 +227,15 @@ GUPnPRootDevice *dev; GUPnPDeviceInfo *subdev1; GUPnPDeviceInfo *subdev2; + const gchar *xml_path = "."; context = gupnp_context_new (mainctx, NULL, 0, NULL); g_assert (context); if (g_getenv ("XML_PATH")) - gupnp_context_host_path (context, g_getenv ("XML_PATH"), ""); - else - gupnp_context_host_path (context, ".", ""); + xml_path = g_getenv ("XML_PATH"); + + gupnp_context_host_path (context, xml_path, ""); /* gupnp_context_host_path (context, "InternetGatewayDevice.xml", "/InternetGatewayDevice.xml"); @@ -242,7 +243,7 @@ gupnp_context_host_path (context, "WANPPPConnection.xml", "/WANPPPConnection.xml"); */ - dev = gupnp_root_device_new (context, "/InternetGatewayDevice.xml"); + dev = gupnp_root_device_new (context, "InternetGatewayDevice.xml", xml_path); g_assert (dev); subdev1 = gupnp_device_info_get_device (GUPNP_DEVICE_INFO (dev), ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org