Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package gupnp-tools for openSUSE:Factory checked in at 2022-10-13 15:44:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gupnp-tools (Old) and /work/SRC/openSUSE:Factory/.gupnp-tools.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gupnp-tools" Thu Oct 13 15:44:53 2022 rev:43 rq:1010292 version:0.12.0 Changes: -------- --- /work/SRC/openSUSE:Factory/gupnp-tools/gupnp-tools.changes 2022-09-21 14:42:53.953832631 +0200 +++ /work/SRC/openSUSE:Factory/.gupnp-tools.new.2275/gupnp-tools.changes 2022-10-13 15:45:24.111119370 +0200 @@ -1,0 +2,22 @@ +Wed Oct 12 09:47:25 UTC 2022 - Bj??rn Lie <bjorn....@gmail.com> + +- Update to version 0.12.0: + + Universal Control Point: a tool that enables one to discover + UPnP devices and services, retrieve information about them, + subscribe to events and invoke actions. + + Network Light: a virtual light bulb that allows control points + to switch it on and off, change its dimming level and query its + current status. It also provides a simple UI to control all the + network lights available on the network. + + AV Control Point: a simple media player UI that enables one to + discover and play multimedia contents available on a network. + It is strictly a control point and therefore does not have any + playback capabilities of it's own and relies on external UPnP + MediaRenderer devices for actual playback. + + Upload: a simple command line utility that uploads files to + known MediaServers. Use Universal Control Point for discovering + the MediaServers. + + Discover: a simple command line utility to run a SSDP discovery + on the network. + +------------------------------------------------------------------- Old: ---- _servicedata gupnp-tools-0.10.3+16.obscpio New: ---- gupnp-tools-0.12.0.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gupnp-tools.spec ++++++ --- /var/tmp/diff_new_pack.Hhw5f2/_old 2022-10-13 15:45:24.675120471 +0200 +++ /var/tmp/diff_new_pack.Hhw5f2/_new 2022-10-13 15:45:24.683120487 +0200 @@ -17,7 +17,7 @@ Name: gupnp-tools -Version: 0.10.3+16 +Version: 0.12.0 Release: 0 Summary: UPnP tools to test and debug UPnP devices and control points License: GPL-2.0-or-later ++++++ _service ++++++ --- /var/tmp/diff_new_pack.Hhw5f2/_old 2022-10-13 15:45:24.739120596 +0200 +++ /var/tmp/diff_new_pack.Hhw5f2/_new 2022-10-13 15:45:24.743120603 +0200 @@ -3,11 +3,10 @@ <service name="obs_scm" mode="manual"> <param name="scm">git</param> <param name="url">https://gitlab.gnome.org/GNOME/gupnp-tools.git</param> - <param name="revision">master</param> - <param name="versionformat">0.10.3+@TAG_OFFSET@</param> + <param name="revision">refs/tags/gupnp-tools-0.12.0</param> + <param name="versionformat">0.12.0+@TAG_OFFSET@</param> <param name="versionrewrite-pattern">(.*)\+0</param> <param name="versionrewrite-replacement">\1</param> - <param name="changesgenerate">enable</param> </service> <service name="tar" mode="buildtime"/> <service name="recompress" mode="buildtime"> ++++++ gupnp-tools-0.10.3+16.obscpio -> gupnp-tools-0.12.0.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/NEWS new/gupnp-tools-0.12.0/NEWS --- old/gupnp-tools-0.10.3+16/NEWS 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/NEWS 2022-10-11 23:00:49.000000000 +0200 @@ -1,3 +1,52 @@ +0.12.0 (stable) +=============== + +Dependency changes: + - GLib required is now 2.68 + - GUPnP requirement up to 1.6 + - Libsoup requirement up to 3.0 + +- All + - Port to GUPnP 1.6 and Libsoup3 + - Fix inconsistencies regarding action errors + - Use more g_autoptr + - Drop gupnp_get_uuid() where used. + - Translation updates + +- Common + - Fix potential NULL pointer dereference + - Use GUPnP utility functions for download of icons + +- Universal CP: + - Fix missing icon on download error + - Fix uninitialized out value + +- Event Dumper: + - Added new tool for dumping UPnP events on command line + +Bugs fixed in this release: + - https://gitlab.gnome.org/GNOME/gupnp-tools/issues/23 + +Merge requests included in this release: + - https://gitlab.gnome.org/GNOME/gupnp-tools/merge_requests/4 + +All contributors to this release: + - Jens Georg <m...@jensge.org> + - J??rgen Benvenuti <gastor...@posteo.org> + - Sabri ??nal <libreaj...@gmail.com> + - Hugo Carvalho <hugokarva...@hotmail.com> + - Luming Zh <lumin...@qq.com> + - Asier Sarasua Garmendia <asiersara...@ni.eus> + - Alan Mortensen <alanmortensen...@gmail.com> + +Added/updated translations: + - da.po, courtesy of Alan Mortensen + - de.po, courtesy of J??rgen Benvenuti + - eu.po, courtesy of Asier Sarasua Garmendia + - pt.po, courtesy of Hugo Carvalho + - tr.po, courtesy of Sabri ??nal + - zh_CN.po, courtesy of lumingzh + 0.10.2 (stable) =============== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/config.h.meson new/gupnp-tools-0.12.0/config.h.meson --- old/gupnp-tools-0.10.3+16/config.h.meson 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/config.h.meson 2022-10-11 23:00:49.000000000 +0200 @@ -5,3 +5,5 @@ #mesondefine DATA_DIR #mesondefine GETTEXT_PACKAGE #mesondefine LOCALEDIR +#mesondefine GLIB_VERSION_MIN_REQUIRED +#mesondefine GLIB_VERSION_MAX_ALLOWED diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/meson.build new/gupnp-tools-0.12.0/meson.build --- old/gupnp-tools-0.10.3+16/meson.build 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/meson.build 2022-10-11 23:00:49.000000000 +0200 @@ -1,4 +1,4 @@ -project('gupnp-tools', ['c'], version: '0.11.0') +project('gupnp-tools', ['c'], version: '0.12.0') gnome = import('gnome') i18n = import('i18n') @@ -7,17 +7,18 @@ win = import('windows') endif -gssdp = dependency('gssdp-1.6', version: '>= 1.5.0', default_options: ['sniffer=false']) -gupnp = dependency('gupnp-1.6', version: '>= 1.5.1') +gssdp = dependency('gssdp-1.6', version: '>= 1.6.0', default_options: ['sniffer=false']) +gupnp = dependency('gupnp-1.6', version: '>= 1.6.0') soup = dependency('libsoup-3.0', version: '>= 3.0') gupnp_av = dependency('gupnp-av-1.0', version: '>= 0.5.5', required: get_option('av-tools')) gtk = dependency('gtk+-3.0', version: '>= 3.10') -glib = dependency('glib-2.0', version: '>= 2.24') -gio = dependency('gio-2.0', version: '>= 2.24') +glib_version = '2.68' +glib = dependency('glib-2.0', version: '>= ' + glib_version) +gio = dependency('gio-2.0', version: '>= ' + glib_version) libxml = dependency('libxml-2.0', version: '>= 2.0') -gobject = dependency('gobject-2.0', version: '>= 2.24') +gobject = dependency('gobject-2.0', version: '>= ' + glib_version) -# Check for gtksourceview (used for XML syntax highlighting) +# Check for gtksourceview (used for XML syntax highlighting) gtksourceview = dependency('gtksourceview-4', required: false) if not gtksourceview.found() gtksourceview = dependency('gtksourceview-3.0', version: '>= 3.2.0', required: false) @@ -42,9 +43,14 @@ conf.set('HAVE_GTK_SOURCEVIEW', gtksourceview.found()) conf.set('GETTEXT_PACKAGE', '"@0@"'.format(meson.project_name())) conf.set('LOCALEDIR', '"@0@"'.format(localedir)) +cc = meson.get_compiler('c') +add_project_arguments(cc.get_supported_arguments('-Werror=deprecated-declarations'), language: 'c') +conf.set('GLIB_VERSION_MIN_REQUIRED', 'GLIB_VERSION_@0@'.format(glib_version.underscorify())) +conf.set('GLIB_VERSION_MAX_ALLOWED', 'GLIB_VERSION_@0@'.format(glib_version.underscorify())) + configure_file(input: 'config.h.meson', output: 'config.h', configuration: conf) -config_header = declare_dependency(compile_args : '-DHAVE_CONFIG_H=1', include_directories : include_directories('.')) +config_header = declare_dependency(include_directories : include_directories('.')) subdir('data') subdir('src') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/av-cp/didl-dialog.c new/gupnp-tools-0.12.0/src/av-cp/didl-dialog.c --- old/gupnp-tools-0.10.3+16/src/av-cp/didl-dialog.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/av-cp/didl-dialog.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include "didl-dialog.h" #include "pretty-print.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/av-cp/entry-completion.c new/gupnp-tools-0.12.0/src/av-cp/entry-completion.c --- old/gupnp-tools-0.10.3+16/src/av-cp/entry-completion.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/av-cp/entry-completion.c 2022-10-11 23:00:49.000000000 +0200 @@ -1,3 +1,5 @@ +#include <config.h> + #include "entry-completion.h" #include <libgupnp-av/gupnp-av.h> @@ -198,4 +200,4 @@ -1); it++; } -} \ No newline at end of file +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/av-cp/gui.c new/gupnp-tools-0.12.0/src/av-cp/gui.c --- old/gupnp-tools-0.10.3+16/src/av-cp/gui.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/av-cp/gui.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,12 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <string.h> -#include <stdlib.h> -#ifdef HAVE_CONFIG_H #include <config.h> -#endif + #include <gmodule.h> +#include <stdlib.h> +#include <string.h> #include "gui.h" #include "playlist-treeview.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/av-cp/main.c new/gupnp-tools-0.12.0/src/av-cp/main.c --- old/gupnp-tools-0.10.3+16/src/av-cp/main.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/av-cp/main.c 2022-10-11 23:00:49.000000000 +0200 @@ -20,9 +20,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include <libgupnp/gupnp-control-point.h> #include <libgupnp-av/gupnp-av.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/av-cp/playlist-treeview.c new/gupnp-tools-0.12.0/src/av-cp/playlist-treeview.c --- old/gupnp-tools-0.10.3+16/src/av-cp/playlist-treeview.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/av-cp/playlist-treeview.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <string.h> #include <stdlib.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif + #include <gmodule.h> #include "playlist-treeview.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/av-cp/renderer-combo.c new/gupnp-tools-0.12.0/src/av-cp/renderer-combo.c --- old/gupnp-tools-0.10.3+16/src/av-cp/renderer-combo.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/av-cp/renderer-combo.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,11 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <string.h> -#include <stdlib.h> -#ifdef HAVE_CONFIG_H #include <config.h> -#endif + +#include <stdlib.h> +#include <string.h> #include "renderer-combo.h" #include "renderer-controls.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/av-cp/renderer-controls.c new/gupnp-tools-0.12.0/src/av-cp/renderer-controls.c --- old/gupnp-tools-0.10.3+16/src/av-cp/renderer-controls.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/av-cp/renderer-controls.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <string.h> #include <stdlib.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif + #include <gtk/gtk.h> #include <gmodule.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/av-cp/search-dialog.c new/gupnp-tools-0.12.0/src/av-cp/search-dialog.c --- old/gupnp-tools-0.10.3+16/src/av-cp/search-dialog.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/av-cp/search-dialog.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <glib/gi18n.h> #include <libgupnp-av/gupnp-av.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/av-cp/server-device.c new/gupnp-tools-0.12.0/src/av-cp/server-device.c --- old/gupnp-tools-0.10.3+16/src/av-cp/server-device.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/av-cp/server-device.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <string.h> #include "server-device.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/common/icons.c new/gupnp-tools-0.12.0/src/common/icons.c --- old/gupnp-tools-0.10.3+16/src/common/icons.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/common/icons.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,9 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H #include <config.h> -#endif #include <string.h> #include <stdlib.h> @@ -54,12 +52,16 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (GetIconURLData, get_icon_url_data_free) static GdkPixbuf * -get_icon_from_bytes (GBytes *icon_data, GetIconURLData *data, GError **error) +get_icon_from_bytes (GBytes *icon_data, + const char *mime, + int source_width, + int source_height, + GError **error) { g_autoptr (GdkPixbufLoader) loader; GdkPixbuf *pixbuf; - loader = gdk_pixbuf_loader_new_with_mime_type (data->mime_type, error); + loader = gdk_pixbuf_loader_new_with_mime_type (mime, error); if (loader == NULL) return NULL; @@ -70,7 +72,7 @@ gint height; /* Preserve the aspect-ratio of the original image */ - aspect_ratio = (gfloat) data->width / data->height; + aspect_ratio = (gfloat) source_width / source_height; height = (gint) (PREFERED_WIDTH / aspect_ratio); pixbuf = gdk_pixbuf_scale_simple (pixbuf, PREFERED_WIDTH, @@ -92,10 +94,17 @@ { GError *error = NULL; g_autoptr (GTask) task = G_TASK (user_data); + g_autofree char *mime = NULL; + int width; + int height; - g_autoptr (GBytes) body = - soup_session_send_and_read_finish (SOUP_SESSION (source), + g_autoptr (GBytes) icon = + gupnp_device_info_get_icon_finish (GUPNP_DEVICE_INFO (source), res, + &mime, + NULL, + &width, + &height, &error); if (error != NULL) { @@ -104,22 +113,13 @@ return; } - SoupMessage *message = - soup_session_get_async_result_message (SOUP_SESSION (source), - res); - - if (!SOUP_STATUS_IS_SUCCESSFUL (soup_message_get_status (message))) { - g_task_return_error ( - task, - g_error_new (G_IO_ERROR, - G_IO_ERROR_FAILED, - "Unable to download icon: %s", - soup_message_get_reason_phrase (message))); - return; - } + GdkPixbuf *device_icon = icon == NULL ? NULL + : get_icon_from_bytes (icon, + mime, + width, + height, + &error); - GdkPixbuf *device_icon = - get_icon_from_bytes (body, g_task_get_task_data (task), &error); if (error != NULL) { g_task_return_error (task, error); @@ -135,59 +135,17 @@ GAsyncReadyCallback callback, gpointer user_data) { - g_autoptr (GTask) task = - g_task_new (info, cancellable, callback, user_data); - - g_autoptr (GetIconURLData) data; - g_autofree char *icon_url; - - data = g_slice_new0 (GetIconURLData); - - icon_url = gupnp_device_info_get_icon_url (info, - NULL, - PREFERED_DEPTH, - PREFERED_WIDTH, - PREFERED_HEIGHT, - TRUE, - &data->mime_type, - NULL, - &data->width, - &data->height); - - if (icon_url == NULL) { - g_task_return_pointer (task, NULL, NULL); + GTask *task = g_task_new (info, cancellable, callback, user_data); - return; - } - - g_autofree char *new_url = - gupnp_context_rewrite_uri (gupnp_device_info_get_context (info), - icon_url); - g_autoptr (SoupMessage) message = - soup_message_new (SOUP_METHOD_GET, new_url); - - if (message == NULL) { - g_task_return_error (task, - g_error_new (G_URI_ERROR, - G_URI_ERROR_FAILED, - "Could not parse icon url %s", - new_url)); - - return; - } - - g_task_set_task_data (task, - g_steal_pointer (&data), - (GDestroyNotify) get_icon_url_data_free); - - soup_session_send_and_read_async (download_session, - message, - G_PRIORITY_LOW, + gupnp_device_info_get_icon_async (info, + NULL, + PREFERED_DEPTH, + PREFERED_WIDTH, + PREFERED_HEIGHT, + TRUE, cancellable, on_got_icon, task); - - g_steal_pointer (&task); } GdkPixbuf * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/common/meson.build new/gupnp-tools-0.12.0/src/common/meson.build --- old/gupnp-tools-0.10.3+16/src/common/meson.build 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/common/meson.build 2022-10-11 23:00:49.000000000 +0200 @@ -7,6 +7,6 @@ ) libutil = static_library('util', ['icons.c', 'icons.h', 'pretty-print.c', 'pretty-print.h'] + util_resource, - dependencies : [libxml, soup, gupnp, gtk]) + dependencies : [libxml, soup, gupnp, gtk, config_header]) util = declare_dependency(link_with: libutil, include_directories : include_directories('.')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/common/pretty-print.c new/gupnp-tools-0.12.0/src/common/pretty-print.c --- old/gupnp-tools-0.10.3+16/src/common/pretty-print.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/common/pretty-print.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include "pretty-print.h" #include <libxml/xmlreader.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/discover/gssdp-discover.c new/gupnp-tools-0.12.0/src/discover/gssdp-discover.c --- old/gupnp-tools-0.10.3+16/src/discover/gssdp-discover.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/discover/gssdp-discover.c 2022-10-11 23:00:49.000000000 +0200 @@ -21,6 +21,8 @@ * Boston, MA 02111-1307, USA. */ +#include <config.h> + #include <glib.h> #include <libgssdp/gssdp.h> #include <stdlib.h> @@ -87,10 +89,6 @@ GOptionContext *context; GSSDPDiscover discover; -#if !GLIB_CHECK_VERSION(2, 35, 0) - g_type_init (); -#endif - context = g_option_context_new ("- discover devices using SSDP"); g_option_context_add_main_entries (context, entries, NULL); @@ -102,7 +100,11 @@ g_option_context_free (context); - discover.client = gssdp_client_new (interface, &error); + discover.client = gssdp_client_new_full (interface, + NULL, + 0, + GSSDP_UDA_VERSION_1_0, + &error); if (error != NULL) { g_warning ("Failed to create GSSDP client: %s", error->message); g_error_free (error); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/discover/meson.build new/gupnp-tools-0.12.0/src/discover/meson.build --- old/gupnp-tools-0.10.3+16/src/discover/meson.build 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/discover/meson.build 2022-10-11 23:00:49.000000000 +0200 @@ -1 +1 @@ -executable('gssdp-discover', ['gssdp-discover.c'], dependencies : [gssdp, gobject], install: true) +executable('gssdp-discover', ['gssdp-discover.c'], dependencies : [gssdp, gobject, config_header], install: true) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/event-dumper/event-dumper.c new/gupnp-tools-0.12.0/src/event-dumper/event-dumper.c --- old/gupnp-tools-0.10.3+16/src/event-dumper/event-dumper.c 1970-01-01 01:00:00.000000000 +0100 +++ new/gupnp-tools-0.12.0/src/event-dumper/event-dumper.c 2022-10-11 23:00:49.000000000 +0200 @@ -0,0 +1,186 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-FileCopyrightText: Copyright 2022 Jens Georg <m...@jensge.org> + +#include <config.h> + +#include <glib-unix.h> +#include <glib.h> +#include <libgupnp/gupnp.h> + +#include <iso646.h> + +void +on_variable_notify (GUPnPServiceProxy *proxy, + const char *variable, + GValue *value, + gpointer user_data) +{ + g_autoptr (GDateTime) dt = g_date_time_new_now_local (); + g_autofree char *timestr = g_date_time_format_iso8601 (dt); + g_auto (GValue) v = G_VALUE_INIT; + g_value_init (&v, G_TYPE_STRING); + g_value_transform (value, &v); + + g_print ("%s|%s|%s|%s|%s\n", + timestr, + gupnp_service_info_get_udn (GUPNP_SERVICE_INFO (user_data)), + gupnp_service_info_get_id (GUPNP_SERVICE_INFO (user_data)), + variable, + g_value_get_string (&v)); +} + +void +on_introspection (GObject *source, GAsyncResult *res, gpointer user_data) +{ + g_autoptr (GError) error = NULL; + + g_autoptr (GUPnPServiceIntrospection) is = + gupnp_service_info_introspect_finish ( + GUPNP_SERVICE_INFO (source), + res, + &error); + + g_autofree char *id = + gupnp_service_info_get_id (GUPNP_SERVICE_INFO (source)); + + if (error != NULL) { + g_warning ("Failed to introspect service proxy %s: %s", + id, + error->message); + + return; + } else { + g_info ("Got introspection for %s", id); + } + + const GList *state_variables = + gupnp_service_introspection_list_state_variables (is); + for (const GList *it = state_variables; it != NULL; + it = g_list_next (it)) { + GUPnPServiceStateVariableInfo *info = it->data; + if (not info->send_events) + continue; + + g_info ("Subscribing to %s (type: %s)", + info->name, + g_type_name (info->type)); + + gupnp_service_proxy_add_notify (GUPNP_SERVICE_PROXY (source), + info->name, + info->type, + on_variable_notify, + source); + } +} + +void +subscribe_to_proxy (GUPnPServiceProxy *sp, gpointer user_data) +{ + g_object_ref (sp); + g_autofree char *id = + gupnp_service_info_get_id (GUPNP_SERVICE_INFO (sp)); + + g_info ("Found new service proxy %s", id); + gupnp_service_info_introspect_async (GUPNP_SERVICE_INFO (sp), + NULL, + on_introspection, + NULL); + gupnp_service_proxy_set_subscribed (sp, TRUE); +} + +void +on_proxy_available (GUPnPControlPoint *cp, + GUPnPDeviceProxy *dp, + gpointer user_data) +{ + g_autofree char *id = + gupnp_device_info_get_friendly_name (GUPNP_DEVICE_INFO (dp)); + + g_info ("New device %s, type %s at %s", + id, + gupnp_device_info_get_device_type (GUPNP_DEVICE_INFO (dp)), + gupnp_device_info_get_location (GUPNP_DEVICE_INFO (dp))); + + GList *services = + gupnp_device_info_list_services (GUPNP_DEVICE_INFO (dp)); + + g_list_foreach ((GList *) services, (GFunc) subscribe_to_proxy, NULL); + + // Shallow-free the list, so we keep a reference to each service + g_list_free_full (services, (GDestroyNotify) g_object_unref); + + g_object_ref (dp); +} + +void +on_proxy_unavailable (GUPnPControlPoint *cp, + GUPnPDeviceProxy *dp, + gpointer user_data) +{ + g_autofree char *id = + gupnp_device_info_get_friendly_name (GUPNP_DEVICE_INFO (dp)); + + g_info ("Lost service proxy %s", id); + + // Dropping the reference we added in on_proxy_available + g_object_unref (dp); +} + +void +on_context_available (GUPnPContextManager *cm, + GUPnPContext *ctx, + gpointer user_data) +{ + + g_info ("New context: %s", + gssdp_client_get_host_ip (GSSDP_CLIENT (ctx))); + g_autoptr (GUPnPControlPoint) cp = + gupnp_control_point_new (ctx, "upnp:rootdevice"); + + g_signal_connect (cp, + "device-proxy-available", + G_CALLBACK (on_proxy_available), + NULL); + + g_signal_connect (cp, + "device-proxy-unavailable", + G_CALLBACK (on_proxy_unavailable), + NULL); + + gssdp_resource_browser_set_active (GSSDP_RESOURCE_BROWSER (cp), TRUE); + + gupnp_context_manager_manage_control_point (cm, cp); +} + +void +on_context_unavailable (GUPnPContextManager *cm, + GUPnPContext *ctx, + gpointer user_data) +{ + g_info ("Context gone: %s", + gssdp_client_get_host_ip (GSSDP_CLIENT (ctx))); +} + +int +main (int argc, char *argv[]) +{ + g_autoptr (GUPnPContextManager) cm = gupnp_context_manager_create (0); + g_autoptr (GMainLoop) loop = g_main_loop_new (NULL, FALSE); + + g_signal_connect (cm, + "context-available", + G_CALLBACK (on_context_available), + NULL); + + g_signal_connect (cm, + "context-unavailable", + G_CALLBACK (on_context_unavailable), + NULL); + + g_unix_signal_add (SIGINT, (GSourceFunc) g_main_loop_quit, loop); + g_unix_signal_add (SIGTERM, (GSourceFunc) g_main_loop_quit, loop); + + g_main_loop_run (loop); + + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/event-dumper/meson.build new/gupnp-tools-0.12.0/src/event-dumper/meson.build --- old/gupnp-tools-0.10.3+16/src/event-dumper/meson.build 1970-01-01 01:00:00.000000000 +0100 +++ new/gupnp-tools-0.12.0/src/event-dumper/meson.build 2022-10-11 23:00:49.000000000 +0200 @@ -0,0 +1 @@ +executable('gupnp-event-dumper', ['event-dumper.c'], dependencies : [gupnp, gobject, config_header], install: true) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/meson.build new/gupnp-tools-0.12.0/src/meson.build --- old/gupnp-tools-0.10.3+16/src/meson.build 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/meson.build 2022-10-11 23:00:49.000000000 +0200 @@ -8,3 +8,4 @@ subdir('discover') subdir('network-light') subdir('universal-cp') +subdir('event-dumper') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/network-light/gui.c new/gupnp-tools-0.12.0/src/network-light/gui.c --- old/gupnp-tools-0.10.3+16/src/network-light/gui.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/network-light/gui.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <string.h> #include <stdlib.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif + #include <gmodule.h> #include "gui.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/network-light/main.c new/gupnp-tools-0.12.0/src/network-light/main.c --- old/gupnp-tools-0.10.3+16/src/network-light/main.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/network-light/main.c 2022-10-11 23:00:49.000000000 +0200 @@ -22,9 +22,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H #include <config.h> -#endif #include <stdio.h> #include <locale.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/network-light/upnp.c new/gupnp-tools-0.12.0/src/network-light/upnp.c --- old/gupnp-tools-0.10.3+16/src/network-light/upnp.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/network-light/upnp.c 2022-10-11 23:00:49.000000000 +0200 @@ -20,6 +20,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <libgupnp/gupnp-root-device.h> #include <libgupnp/gupnp-service.h> #include <stdio.h> @@ -28,10 +30,6 @@ #include <gmodule.h> #include <glib/gstdio.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - #include "gui.h" #include "upnp.h" #include "main.h" @@ -412,7 +410,7 @@ xmlNode *uuid_node; char *udn; - uuid = gupnp_get_uuid (); + uuid = g_uuid_string_random (); const xmlDoc *xml_doc = gupnp_xml_doc_get_doc (doc); uuid_node = xml_util_get_element ((xmlNode *) xml_doc, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/universal-cp/action-dialog.c new/gupnp-tools-0.12.0/src/universal-cp/action-dialog.c --- old/gupnp-tools-0.10.3+16/src/universal-cp/action-dialog.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/universal-cp/action-dialog.c 2022-10-11 23:00:49.000000000 +0200 @@ -20,13 +20,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <string.h> #include <stdlib.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - #include <gmodule.h> #include <glib/gi18n.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/universal-cp/details-treeview.c new/gupnp-tools-0.12.0/src/universal-cp/details-treeview.c --- old/gupnp-tools-0.10.3+16/src/universal-cp/details-treeview.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/universal-cp/details-treeview.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,11 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <string.h> -#include <stdlib.h> -#ifdef HAVE_CONFIG_H #include <config.h> -#endif + +#include <stdlib.h> +#include <string.h> #include <gmodule.h> #include <glib/gi18n.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/universal-cp/device-treeview.c new/gupnp-tools-0.12.0/src/universal-cp/device-treeview.c --- old/gupnp-tools-0.10.3+16/src/universal-cp/device-treeview.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/universal-cp/device-treeview.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,11 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <string.h> -#include <stdlib.h> -#ifdef HAVE_CONFIG_H #include <config.h> -#endif + +#include <stdlib.h> +#include <string.h> #include <gmodule.h> #include <glib/gi18n.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/universal-cp/event-treeview.c new/gupnp-tools-0.12.0/src/universal-cp/event-treeview.c --- old/gupnp-tools-0.10.3+16/src/universal-cp/event-treeview.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/universal-cp/event-treeview.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,11 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <string.h> -#include <stdlib.h> -#ifdef HAVE_CONFIG_H #include <config.h> -#endif + +#include <stdlib.h> +#include <string.h> #include <gmodule.h> #include <glib/gi18n.h> @@ -309,11 +308,7 @@ if (size > MAX_VALUE_SIZE) size = MAX_VALUE_SIZE; -#if GLIB_CHECK_VERSION(2,68,0) display_value = g_memdup2 (value, size + 1); -#else - display_value = g_memdup (value, size + 1); -#endif display_value[size] = '\0'; return display_value; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/universal-cp/gui.c new/gupnp-tools-0.12.0/src/universal-cp/gui.c --- old/gupnp-tools-0.10.3+16/src/universal-cp/gui.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/universal-cp/gui.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,11 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <string.h> -#include <stdlib.h> -#ifdef HAVE_CONFIG_H #include <config.h> -#endif + +#include <stdlib.h> +#include <string.h> #include <gmodule.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/universal-cp/main.c new/gupnp-tools-0.12.0/src/universal-cp/main.c --- old/gupnp-tools-0.10.3+16/src/universal-cp/main.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/universal-cp/main.c 2022-10-11 23:00:49.000000000 +0200 @@ -20,9 +20,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include <libgupnp/gupnp.h> #include "gui.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/upload/container-search.c new/gupnp-tools-0.12.0/src/upload/container-search.c --- old/gupnp-tools-0.10.3+16/src/upload/container-search.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/upload/container-search.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <libgupnp/gupnp.h> #include <libgupnp-av/gupnp-av.h> #include <gio/gio.h> @@ -74,9 +76,9 @@ static void browse_cb (GObject *object, GAsyncResult *res, gpointer user_data) { - GError *error = NULL; - char *result = NULL; - char *container_id = NULL; + g_autoptr (GError) error = NULL; + g_autofree char *result = NULL; + g_autofree char *container_id = NULL; GUPnPServiceProxyAction *action = NULL; GUPnPServiceProxy *proxy = GUPNP_SERVICE_PROXY (object); @@ -85,9 +87,6 @@ if (error != NULL) { g_critical ("Failed to browse root container: %s", error->message); - - g_error_free (error); - application_exit (); return; @@ -102,9 +101,6 @@ if (error != NULL) { g_critical ("Failed to browse root container: %s", error->message); - - g_error_free (error); - application_exit (); return; @@ -115,17 +111,11 @@ container_id = parse_result (result); if (container_id == NULL) { g_critical ("Failed to find a suitable container for upload."); - g_free (result); application_exit (); - - return; } else { container_found (container_id); - g_free (container_id); } - - g_free (result); } void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/upload/control_point.c new/gupnp-tools-0.12.0/src/upload/control_point.c --- old/gupnp-tools-0.10.3+16/src/upload/control_point.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/upload/control_point.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <libgupnp/gupnp.h> #include <string.h> #include <stdlib.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/upload/item-creation.c new/gupnp-tools-0.12.0/src/upload/item-creation.c --- old/gupnp-tools-0.10.3+16/src/upload/item-creation.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/upload/item-creation.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <libgupnp/gupnp.h> #include <libgupnp-av/gupnp-av.h> #include <gio/gio.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/upload/main.c new/gupnp-tools-0.12.0/src/upload/main.c --- old/gupnp-tools-0.10.3+16/src/upload/main.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/upload/main.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,12 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <libgupnp/gupnp.h> -#include <string.h> #include <stdlib.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <string.h> #include "control_point.h" #include "item-creation.h" @@ -134,13 +133,9 @@ main (gint argc, gchar *argv[]) { - GError *error = NULL; + g_autoptr (GError) error = NULL; gint i; - GOptionContext *context; - -#if !GLIB_CHECK_VERSION(2, 35, 0) - g_type_init (); -#endif + g_autoptr (GOptionContext) context; context = g_option_context_new ("- Upload files to UPnP MediaServer"); g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE); @@ -151,11 +146,10 @@ } if (argc < 2) { - char *help = NULL; + g_autofree char *help = NULL; help = g_option_context_get_help (context, TRUE, NULL); g_print ("%s\n", help); - g_free (help); return -4; } @@ -181,11 +175,14 @@ } error = NULL; - upnp_context = gupnp_context_new (interface, 0, &error); + upnp_context = gupnp_context_new_full (interface, + NULL, + 0, + GSSDP_UDA_VERSION_1_0, + &error); if (error) { g_printerr ("Error creating the GUPnP context: %s\n", - error->message); - g_error_free (error); + error->message); return -6; } @@ -206,7 +203,6 @@ g_clear_pointer (&main_loop, g_main_loop_unref); deinit_control_point (); g_object_unref (upnp_context); - g_option_context_free (context); g_free (dest_container); g_free (interface); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-tools-0.10.3+16/src/upload/transfer.c new/gupnp-tools-0.12.0/src/upload/transfer.c --- old/gupnp-tools-0.10.3+16/src/upload/transfer.c 2022-07-29 21:30:20.000000000 +0200 +++ new/gupnp-tools-0.12.0/src/upload/transfer.c 2022-10-11 23:00:49.000000000 +0200 @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <libgupnp/gupnp.h> #include <string.h> #include <stdlib.h> @@ -40,15 +42,14 @@ GAsyncResult *result, gpointer user_data) { - GError *error; + g_autoptr (GError) error = NULL; TrackTransferData *data; - guint64 total, length; - gchar *status; + guint64 total = 0, length = 0; + g_autofree gchar *status = NULL; GUPnPServiceProxyAction *action; data = (TrackTransferData *) user_data; - error = NULL; total = length = 0; status = NULL; action = gupnp_service_proxy_call_action_finish ( @@ -58,6 +59,7 @@ if (error == NULL) { gupnp_service_proxy_action_get_result (action, &error, NULL); } + if (error != NULL) { g_critical ("Failed to track file transfer: %s", error->message); ++++++ gupnp-tools.obsinfo ++++++ --- /var/tmp/diff_new_pack.Hhw5f2/_old 2022-10-13 15:45:24.943120994 +0200 +++ /var/tmp/diff_new_pack.Hhw5f2/_new 2022-10-13 15:45:24.947121002 +0200 @@ -1,5 +1,5 @@ name: gupnp-tools -version: 0.10.3+16 -mtime: 1659123020 -commit: bb5a8ca719c83dc1c193858d24dcad93facc1c5f +version: 0.12.0 +mtime: 1665522049 +commit: 8886f95134d95e49d859512fc0c2c62ed63a72b2