Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package gupnp for openSUSE:Factory checked in at 2022-01-16 23:18:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gupnp (Old) and /work/SRC/openSUSE:Factory/.gupnp.new.1892 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gupnp" Sun Jan 16 23:18:04 2022 rev:71 rq:946593 version:1.4.3 Changes: -------- --- /work/SRC/openSUSE:Factory/gupnp/gupnp.changes 2022-01-11 00:02:19.465262996 +0100 +++ /work/SRC/openSUSE:Factory/.gupnp.new.1892/gupnp.changes 2022-01-16 23:19:02.610370945 +0100 @@ -1,0 +2,8 @@ +Fri Jan 14 17:40:58 UTC 2022 - Bj??rn Lie <bjorn....@gmail.com> + +- Update to version 1.4.3: + + ServiceProxy: + - Properly propagate cancelled actions in deprecated calls. + - Fix deprecated async calls, again. + +------------------------------------------------------------------- Old: ---- gupnp-1.4.2.tar.xz New: ---- gupnp-1.4.3.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gupnp.spec ++++++ --- /var/tmp/diff_new_pack.DL5ilC/_old 2022-01-16 23:19:03.062371167 +0100 +++ /var/tmp/diff_new_pack.DL5ilC/_new 2022-01-16 23:19:03.066371169 +0100 @@ -21,7 +21,7 @@ %define sover 1.2 Name: gupnp -Version: 1.4.2 +Version: 1.4.3 Release: 0 Summary: Implementation of the UPnP specification License: LGPL-2.0-or-later ++++++ gupnp-1.4.2.tar.xz -> gupnp-1.4.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-1.4.2/NEWS new/gupnp-1.4.3/NEWS --- old/gupnp-1.4.2/NEWS 2022-01-08 11:01:21.194516000 +0100 +++ new/gupnp-1.4.3/NEWS 2022-01-13 18:56:23.515280000 +0100 @@ -1,3 +1,16 @@ +1.4.3 (stable) +===== + +- ServiceProxy: Properly propagate cancelled actions in + deprecated calls +- ServiceProxy: Fix deprecated async calls, again. + +Bugs fixed in this release: +- https://gitlab.gnome.org/GNOME/gupnp/issues/67 + +All contributors to this release: +- Jens Georg <m...@jensge.org> + 1.4.2 (stable) ===== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-1.4.2/libgupnp/gupnp-service-proxy.c new/gupnp-1.4.3/libgupnp/gupnp-service-proxy.c --- old/gupnp-1.4.2/libgupnp/gupnp-service-proxy.c 2022-01-08 11:01:21.206516300 +0100 +++ new/gupnp-1.4.3/libgupnp/gupnp-service-proxy.c 2022-01-13 18:56:23.524279800 +0100 @@ -539,7 +539,9 @@ !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { if (error != NULL) g_propagate_error (&action->error, error); - action->callback (action->proxy, action, action->user_data); + // action's proxy will be NULL now due to call_action_finish. So + // we use the one from our callback + action->callback (GUPNP_SERVICE_PROXY (source), action, action->user_data); } g_clear_error (&error); @@ -746,18 +748,18 @@ action->cancellable_connection_id = 0; } - if (SOUP_STATUS_IS_TRANSPORT_ERROR (msg->status_code)) { - g_task_return_new_error ( - task, - GUPNP_SERVER_ERROR, - GUPNP_SERVER_ERROR_OTHER, - "Server does not allow any POST messages"); - } else if (msg->status_code == SOUP_STATUS_CANCELLED) { + if (msg->status_code == SOUP_STATUS_CANCELLED) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_CANCELLED, "Action message was cancelled"); - } else { + } else if (SOUP_STATUS_IS_TRANSPORT_ERROR (msg->status_code)) { + g_task_return_new_error (task, + GUPNP_SERVER_ERROR, + GUPNP_SERVER_ERROR_OTHER, + "%s", + msg->reason_phrase); + } else { g_task_return_pointer (task, g_task_get_task_data (task), NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-1.4.2/meson.build new/gupnp-1.4.3/meson.build --- old/gupnp-1.4.2/meson.build 2022-01-08 11:01:21.209516300 +0100 +++ new/gupnp-1.4.3/meson.build 2022-01-13 18:56:23.528280000 +0100 @@ -1,4 +1,4 @@ -project('gupnp', 'c', version : '1.4.2', meson_version : '>= 0.54.0') +project('gupnp', 'c', version : '1.4.3', meson_version : '>= 0.54.0') gnome = import('gnome') pkg = import('pkgconfig') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-1.4.2/tests/test-bugs.c new/gupnp-1.4.3/tests/test-bugs.c --- old/gupnp-1.4.2/tests/test-bugs.c 2022-01-08 11:01:21.210516200 +0100 +++ new/gupnp-1.4.3/tests/test-bugs.c 2022-01-13 18:56:23.529280000 +0100 @@ -911,6 +911,141 @@ g_main_loop_unref (data.loop); } +static void +test_ggo_67_on_ping (GUPnPServiceProxy *proxy, + GUPnPServiceProxyAction *action, + gpointer user_data) +{ + TestServiceProxyData *data = (TestServiceProxyData *) user_data; + + g_assert_nonnull (proxy); + g_assert_nonnull (action); + g_assert_nonnull (user_data); + + g_main_loop_quit (data->loop); +} + +static void +test_ggo_67_on_ping_call (GUPnPService *service, + GUPnPServiceAction *action, + gpointer user_data) +{ + gupnp_service_action_return_success (action); +} + +// Verbatim copy of 58, just with a different call-back +static void +test_ggo_67 () +{ + GUPnPContext *context = NULL; + GError *error = NULL; + GUPnPControlPoint *cp = NULL; + GUPnPRootDevice *rd; + TestServiceProxyData data = { NULL, NULL }; + GUPnPServiceInfo *info = NULL; + + data.loop = g_main_loop_new (NULL, FALSE); + + context = create_context (0, &error); + g_assert_no_error (error); + g_assert (context != NULL); + + cp = gupnp_control_point_new ( + context, + "urn:test-gupnp-org:service:TestService:1"); + + gssdp_resource_browser_set_active (GSSDP_RESOURCE_BROWSER (cp), TRUE); + + g_signal_connect (G_OBJECT (cp), + "service-proxy-available", + G_CALLBACK (test_on_sp_available), + &data); + + + rd = gupnp_root_device_new (context, + "TestDevice.xml", + DATA_PATH, + &error); + g_assert_no_error (error); + g_assert (rd != NULL); + gupnp_root_device_set_available (rd, TRUE); + info = gupnp_device_info_get_service ( + GUPNP_DEVICE_INFO (rd), + "urn:test-gupnp-org:service:TestService:1"); + g_signal_connect (G_OBJECT (info), + "action-invoked::Ping", + G_CALLBACK (test_ggo_67_on_ping_call), + &data); + + test_run_loop (data.loop); + g_assert (data.proxy != NULL); + + G_GNUC_BEGIN_IGNORE_DEPRECATIONS + GUPnPServiceProxyAction *action = + gupnp_service_proxy_begin_action (data.proxy, + "Ping", + test_ggo_67_on_ping, + &data, + NULL); + + test_run_loop (data.loop); + + gboolean success = gupnp_service_proxy_end_action (data.proxy, + action, + &error, + NULL); + + g_assert (success); + g_assert_no_error (error); + + action = gupnp_service_proxy_begin_action (data.proxy, + "Ping", + test_ggo_67_on_ping, + &data, + NULL); + + test_run_loop (data.loop); + + GHashTable *result_hash = g_hash_table_new (g_str_hash, g_str_equal); + + success = gupnp_service_proxy_end_action_hash (data.proxy, + action, + result_hash, + &error); + g_hash_table_destroy (result_hash); + + g_assert (success); + g_assert_no_error (error); + + action = gupnp_service_proxy_begin_action (data.proxy, + "Ping", + test_ggo_67_on_ping, + &data, + NULL); + + test_run_loop (data.loop); + + GList *result_list = NULL; + success = gupnp_service_proxy_end_action_list (data.proxy, + action, + NULL, + NULL, + &result_list, + &error); + + g_assert (success); + g_assert_no_error (error); + + G_GNUC_END_IGNORE_DEPRECATIONS + + g_object_unref (info); + g_object_unref (data.proxy); + g_object_unref (cp); + g_object_unref (rd); + g_object_unref (context); + + g_main_loop_unref (data.loop); +} int main (int argc, char *argv[]) { g_test_init (&argc, &argv, NULL); @@ -924,6 +1059,7 @@ g_test_add_func ("/bugs/ggo/42", test_ggo_42); g_test_add_func ("/bugs/ggo/63", test_ggo_63); g_test_add_func ("/bugs/ggo/60/no-crash", test_ggo_60_no_crash); + g_test_add_func ("/bugs/ggo/67", test_ggo_67); return g_test_run (); }