From 42c485ff56f5425cd592ae73c1c0e6c0f1de2b13 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 11 Jun 2014 10:15:05 +0200 Subject: mcd_account_delete: make sure that the account stays alive Fix a regression introduced when backporting fix for https://bugs.freedesktop.org/show_bug.cgi?id=79827 --- src/mcd-account.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mcd-account.c b/src/mcd-account.c index 48880bef..1ed237bb 100644 --- a/src/mcd-account.c +++ b/src/mcd-account.c @@ -774,6 +774,10 @@ mcd_account_delete (McdAccount *account, mcd_storage_commit (priv->storage, name); + /* The callback may drop the latest ref on @account so make sure it stays + * alive while we still need it. */ + g_object_ref (account); + if (callback != NULL) callback (account, NULL, user_data); @@ -788,6 +792,7 @@ mcd_account_delete (McdAccount *account, } unregister_dbus_service (account); + g_object_unref (account); } void -- cgit v1.2.1 From fb8000842e0b20f4aa4928edd62736b5cea2e8d5 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 11 Jun 2014 15:44:01 +0200 Subject: 5.16.2 --- NEWS | 8 +++++++- configure.ac | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 1a5a3521..19db6530 100644 --- a/NEWS +++ b/NEWS @@ -1,10 +1,16 @@ -telepathy-mission-control 5.16.2 (UNRELEASED) +telepathy-mission-control 5.16.2 (2014-06-11) ============================================= Fixes: • don't crash in 'mc-tool auto-presence' subcommand (fd.o #74187, Simon) +• fix parallel build (Simon) + +• Use G_STRFUNC in mission-control-plugins's DEBUG macro (Guillaume) + +• Fix a crash when GOA is restarted (fd.o #79827, Guillaume) + telepathy-mission-control 5.16.1 (2014-01-27) ============================================= diff --git a/configure.ac b/configure.ac index df3f0b58..60245886 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Set the version number to e.g. 5.x.y immediately before a release. dnl Set the version number to e.g. 5.x.y+ immediately after (this will dnl enable -Werror). -AC_INIT([telepathy-mission-control], [5.16.1+]) +AC_INIT([telepathy-mission-control], [5.16.2]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) -- cgit v1.2.1 From 810b32e92f2896a1ad8ee204bf6b8d5456a5db08 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 11 Jun 2014 15:50:37 +0200 Subject: nano flag --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 60245886..d44c7cd3 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Set the version number to e.g. 5.x.y immediately before a release. dnl Set the version number to e.g. 5.x.y+ immediately after (this will dnl enable -Werror). -AC_INIT([telepathy-mission-control], [5.16.2]) +AC_INIT([telepathy-mission-control], [5.16.2+]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) -- cgit v1.2.1 From ab29ae42f751bf7e4ecc9a601e09cafab499fd14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Kie=C3=9F?= Date: Mon, 25 Aug 2014 14:11:35 +0200 Subject: mcd-connection: use tp_asv_new() properly The second argument has to be the type of the value. https://bugs.freedesktop.org/show_bug.cgi?id=81751 --- src/mcd-connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mcd-connection.c b/src/mcd-connection.c index e04ff78f..e225da2c 100644 --- a/src/mcd-connection.c +++ b/src/mcd-connection.c @@ -2267,7 +2267,7 @@ _mcd_connection_set_tp_connection (McdConnection *connection, if (!priv->tp_conn) { GHashTable *details = tp_asv_new ( - "debug-message", inner_error->message, + "debug-message", G_TYPE_STRING, inner_error->message, NULL); /* Constructing a TpConnection can only fail from invalid arguments, -- cgit v1.2.1 From 84dc7d0fd952a9ef3d200ac5557cdf2daccca145 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 25 Aug 2014 14:34:18 +0200 Subject: 5.16.3 --- NEWS | 7 +++++++ configure.ac | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 19db6530..7f2f682d 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,10 @@ +telepathy-mission-control 5.16.3 (2014-08-25) +============================================= + +Fixes: + +• mcd-connection: use tp_asv_new() properly (fd.o #81751, Steffen Kieß) + telepathy-mission-control 5.16.2 (2014-06-11) ============================================= diff --git a/configure.ac b/configure.ac index d44c7cd3..b1727f9d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Set the version number to e.g. 5.x.y immediately before a release. dnl Set the version number to e.g. 5.x.y+ immediately after (this will dnl enable -Werror). -AC_INIT([telepathy-mission-control], [5.16.2+]) +AC_INIT([telepathy-mission-control], [5.16.3]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) -- cgit v1.2.1 From 8f5a4fb823c1334e6d845aaa0c57f0fcffa42635 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 25 Aug 2014 14:47:50 +0200 Subject: nano flag --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b1727f9d..78af8506 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Set the version number to e.g. 5.x.y immediately before a release. dnl Set the version number to e.g. 5.x.y+ immediately after (this will dnl enable -Werror). -AC_INIT([telepathy-mission-control], [5.16.3]) +AC_INIT([telepathy-mission-control], [5.16.3+]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) -- cgit v1.2.1 From 3d3a13c561e858853af5c601373be3ea0746f58c Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 28 Aug 2014 14:19:30 +0200 Subject: server: exit early if we failed to create McdService mcd_service_new() can return NULL if we didn't manage to connect to D-Bus. Best to handle this gracefully rather than crashing horribly. This is the top crasher on Ubuntu btw. https://errors.ubuntu.com/problem/7e2a5f9a379f34a347895782ae948177926a1932 --- server/mc-server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/mc-server.c b/server/mc-server.c index 6e77950d..aa6c696b 100644 --- a/server/mc-server.c +++ b/server/mc-server.c @@ -174,6 +174,8 @@ main (int argc, char **argv) tp_debug_set_flags (g_getenv ("MC_TP_DEBUG")); mcd = mcd_service_new (); + if (mcd == NULL) + return 1; /* Listen for suicide notification */ g_signal_connect_after (mcd, "abort", G_CALLBACK (on_abort), mcd); -- cgit v1.2.1 From 91499340222a563bacce7994f32275c38ff55ff0 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Wed, 29 Jun 2016 22:37:24 -0700 Subject: libnm-glib is deprecated and may not be available. This patch switches to use th enew libnm API, also snice nm_client_new now takes a GError, I thought I'd report the error message if mission control can't connect to the network manager. Additionally we can remove a definition of the NM_CHECK_VERSION macro for old versions of NM, as well as a guard for the NM_STATE_DISCONNECTING constant. --- configure.ac | 2 +- src/connectivity-monitor.c | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 78af8506..c4c8122c 100644 --- a/configure.ac +++ b/configure.ac @@ -270,7 +270,7 @@ if test "x$with_connectivity" = "xno" || test "x$with_connectivity" = "xconnman" else PKG_CHECK_MODULES(NETWORK_MANAGER, [ - libnm-glib >= 0.7.0 + libnm ], have_nm="yes", have_nm="no") if test "x$have_nm" = "xyes"; then diff --git a/src/connectivity-monitor.c b/src/connectivity-monitor.c index 8b3d3856..bb09096e 100644 --- a/src/connectivity-monitor.c +++ b/src/connectivity-monitor.c @@ -32,7 +32,7 @@ #endif #ifdef HAVE_NM -#include +#include #endif #ifdef HAVE_UPOWER @@ -190,10 +190,6 @@ connectivity_monitor_remove_states ( #ifdef HAVE_NM -#if !defined(NM_CHECK_VERSION) -#define NM_CHECK_VERSION(x,y,z) 0 -#endif - static void connectivity_monitor_nm_state_change_cb (NMClient *client, const GParamSpec *pspec, @@ -210,9 +206,7 @@ connectivity_monitor_nm_state_change_cb (NMClient *client, state = nm_client_get_state (priv->nm_client); if (state == NM_STATE_CONNECTING -#if NM_CHECK_VERSION(0,8,992) || state == NM_STATE_DISCONNECTING -#endif || state == NM_STATE_ASLEEP) { DEBUG ("New NetworkManager network state %d (unstable state)", state); @@ -504,6 +498,7 @@ static void mcd_connectivity_monitor_init (McdConnectivityMonitor *connectivity_monitor) { McdConnectivityMonitorPrivate *priv; + GError *error = NULL; priv = G_TYPE_INSTANCE_GET_PRIVATE (connectivity_monitor, MCD_TYPE_CONNECTIVITY_MONITOR, McdConnectivityMonitorPrivate); @@ -532,7 +527,7 @@ mcd_connectivity_monitor_init (McdConnectivityMonitor *connectivity_monitor) #endif #ifdef HAVE_NM - priv->nm_client = nm_client_new (); + priv->nm_client = nm_client_new (NULL, &error); if (priv->nm_client != NULL) { priv->state_change_signal_id = g_signal_connect (priv->nm_client, @@ -543,7 +538,7 @@ mcd_connectivity_monitor_init (McdConnectivityMonitor *connectivity_monitor) } else { - DEBUG ("Failed to get NetworkManager proxy"); + DEBUG ("Failed to get NetworkManager proxy: %s", error->message); } #endif -- cgit v1.2.1 From 497e26593446d343105f594997ef0689aac4be4f Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Fri, 1 Jul 2016 16:04:36 +0300 Subject: connectivity-monitor.c: fix unused variable warning when compiling without nm support This GError variable is not used anywhere else in this function. --- src/connectivity-monitor.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/connectivity-monitor.c b/src/connectivity-monitor.c index bb09096e..6d699723 100644 --- a/src/connectivity-monitor.c +++ b/src/connectivity-monitor.c @@ -498,7 +498,6 @@ static void mcd_connectivity_monitor_init (McdConnectivityMonitor *connectivity_monitor) { McdConnectivityMonitorPrivate *priv; - GError *error = NULL; priv = G_TYPE_INSTANCE_GET_PRIVATE (connectivity_monitor, MCD_TYPE_CONNECTIVITY_MONITOR, McdConnectivityMonitorPrivate); @@ -527,19 +526,24 @@ mcd_connectivity_monitor_init (McdConnectivityMonitor *connectivity_monitor) #endif #ifdef HAVE_NM - priv->nm_client = nm_client_new (NULL, &error); - if (priv->nm_client != NULL) - { - priv->state_change_signal_id = g_signal_connect (priv->nm_client, - "notify::" NM_CLIENT_STATE, - G_CALLBACK (connectivity_monitor_nm_state_change_cb), connectivity_monitor); - - connectivity_monitor_nm_state_change_cb (priv->nm_client, NULL, connectivity_monitor); - } - else - { - DEBUG ("Failed to get NetworkManager proxy: %s", error->message); - } + { + GError *error = NULL; + priv->nm_client = nm_client_new (NULL, &error); + if (priv->nm_client != NULL) + { + priv->state_change_signal_id = g_signal_connect (priv->nm_client, + "notify::" NM_CLIENT_STATE, + G_CALLBACK (connectivity_monitor_nm_state_change_cb), + connectivity_monitor); + + connectivity_monitor_nm_state_change_cb (priv->nm_client, NULL, + connectivity_monitor); + } + else + { + DEBUG ("Failed to get NetworkManager proxy: %s", error->message); + } + } #endif #ifdef HAVE_UPOWER -- cgit v1.2.1 From 20dc94875afecacf086e57f67447e9384fb85d90 Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Fri, 26 Feb 2016 22:32:28 +0800 Subject: Don't initialize function pointers with G_TYPE_INVALID https://bugs.freedesktop.org/show_bug.cgi?id=94310 Reviewed-by: George Kiagiadakis --- src/mcd-account-manager.c | 2 +- src/mcd-account.c | 2 +- src/mcd-dispatch-operation.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c index 57296cd8..8584308d 100644 --- a/src/mcd-account-manager.c +++ b/src/mcd-account-manager.c @@ -77,7 +77,7 @@ static const McdInterfaceData account_manager_interfaces[] = { MCD_IMPLEMENT_IFACE (mc_svc_account_manager_interface_hidden_get_type, account_manager_hidden, MC_IFACE_ACCOUNT_MANAGER_INTERFACE_HIDDEN), - { G_TYPE_INVALID, } + { NULL, } }; G_DEFINE_TYPE_WITH_CODE (McdAccountManager, mcd_account_manager, G_TYPE_OBJECT, diff --git a/src/mcd-account.c b/src/mcd-account.c index 1ed237bb..e7f5007d 100644 --- a/src/mcd-account.c +++ b/src/mcd-account.c @@ -98,7 +98,7 @@ static const McdInterfaceData account_interfaces[] = { account_external_password_storage, MC_IFACE_ACCOUNT_INTERFACE_EXTERNAL_PASSWORD_STORAGE), - { G_TYPE_INVALID, } + { NULL, } }; G_DEFINE_TYPE_WITH_CODE (McdAccount, mcd_account, G_TYPE_OBJECT, diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c index 8df17cb4..0f2850fe 100644 --- a/src/mcd-dispatch-operation.c +++ b/src/mcd-dispatch-operation.c @@ -58,7 +58,7 @@ static const McdInterfaceData dispatch_operation_interfaces[] = { MCD_IMPLEMENT_IFACE (tp_svc_channel_dispatch_operation_get_type, dispatch_operation, TP_IFACE_CHANNEL_DISPATCH_OPERATION), - { G_TYPE_INVALID, } + { NULL, } }; G_DEFINE_TYPE_WITH_CODE (McdDispatchOperation, _mcd_dispatch_operation, -- cgit v1.2.1 From d3e011a2dfaf6ecb41651de7ccc0d2bb520f3208 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Fri, 1 Jul 2016 18:31:21 +0300 Subject: tests/twisted/fake-network-monitor: implement the "network-metered" and "connectivity" properties of GNetworkMonitor "connectivity" is required since glib 2.44 "network-metered" is required since glib 2.46 https://bugs.freedesktop.org/show_bug.cgi?id=96763 Reviewed-by: Diane Trout --- tests/twisted/fake-network-monitor.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/twisted/fake-network-monitor.c b/tests/twisted/fake-network-monitor.c index b78d421c..f8b43cda 100644 --- a/tests/twisted/fake-network-monitor.c +++ b/tests/twisted/fake-network-monitor.c @@ -44,7 +44,9 @@ static GType fake_network_monitor_get_type (void); enum { PROP_0, - PROP_NETWORK_AVAILABLE + PROP_NETWORK_AVAILABLE, + PROP_NETWORK_METERED, + PROP_CONNECTIVITY }; static void initable_iface_init (GInitableIface *); @@ -80,7 +82,13 @@ fake_network_monitor_get_property (GObject *object, case PROP_NETWORK_AVAILABLE: g_value_set_boolean (value, self->available); break; - + case PROP_NETWORK_METERED: + g_value_set_boolean (value, FALSE); + break; + case PROP_CONNECTIVITY: + g_value_set_enum (value, self->available ? + G_NETWORK_CONNECTIVITY_FULL : G_NETWORK_CONNECTIVITY_LOCAL); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); break; @@ -111,6 +119,10 @@ fake_network_monitor_class_init (FakeNetworkMonitorClass *cls) g_object_class_override_property (oclass, PROP_NETWORK_AVAILABLE, "network-available"); + g_object_class_override_property (oclass, PROP_NETWORK_METERED, + "network-metered"); + g_object_class_override_property (oclass, PROP_CONNECTIVITY, + "connectivity"); } static void -- cgit v1.2.1 From e732563380bda697c468b591ed126932b022d97f Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Fri, 1 Jul 2016 18:43:28 +0300 Subject: configure: bump glib version requirement to 2.46 required for the fake-network-monitor in the unit tests https://bugs.freedesktop.org/show_bug.cgi?id=96763 Reviewed-by: Diane Trout --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index c4c8122c..ec77f3b3 100644 --- a/configure.ac +++ b/configure.ac @@ -235,7 +235,7 @@ AC_DEFINE([TP_SEAL_ENABLE], [], [Define to hide deprecated struct fields]) AC_DEFINE([TP_DISABLE_SINGLE_INCLUDE], [], [Avoid individual headers]) PKG_CHECK_MODULES([GLIB], - [glib-2.0 >= 2.32, gobject-2.0, gmodule-no-export-2.0, gio-2.0]) + [glib-2.0 >= 2.46, gobject-2.0, gmodule-no-export-2.0, gio-2.0]) PKG_CHECK_MODULES([GIO_UNIX], [gio-unix-2.0], [ @@ -245,8 +245,8 @@ PKG_CHECK_MODULES([GIO_UNIX], [gio-unix-2.0], ], []) -AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_30], [Ignore post 2.30 deprecations]) -AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_32], [Prevent post 2.32 APIs]) +AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_46], [Ignore post 2.46 deprecations]) +AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_46], [Prevent post 2.46 APIs]) dnl Check for MCE, a Maemo service used to determine when the device is idle. PKG_CHECK_MODULES([MCE], mce >= 1.5, [HAVE_MCE=yes], [HAVE_MCE=no]) -- cgit v1.2.1 From cbe4ec1a4e1167ce8231849bcbbdec44d48422f2 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Wed, 13 Jul 2016 17:34:39 +0300 Subject: configure: do not enable upower support if upower is >=0.99 The code doesn't compile anymore, the features used have been removed. The replacement is logind, for which support exists in MC since 5.15.1. https://bugs.freedesktop.org/show_bug.cgi?id=70458 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ec77f3b3..6d2f9d74 100644 --- a/configure.ac +++ b/configure.ac @@ -307,7 +307,7 @@ AC_ARG_ENABLE([upower], [enable_upower=auto]) if test "x$enable_upower" != xno; then - PKG_CHECK_MODULES([UPOWER_GLIB], [upower-glib], + PKG_CHECK_MODULES([UPOWER_GLIB], [upower-glib < 0.99], [AC_DEFINE([HAVE_UPOWER], [1], [Define to use upower-glib]) have_upower=yes ], -- cgit v1.2.1 From c5589bdc4ded0382adf6ba9ffc5c27f8a6e0568d Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Mon, 11 Jan 2016 15:07:56 +0800 Subject: mc-wait-for-name: Call setlocale in main function It is required to correctly show translated messages on some locales. https://bugs.freedesktop.org/show_bug.cgi?id=93661 --- util/wait-for-name.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/wait-for-name.c b/util/wait-for-name.c index 13f2f5bd..6a27723e 100644 --- a/util/wait-for-name.c +++ b/util/wait-for-name.c @@ -50,6 +50,7 @@ #endif #include +#include #include #include @@ -148,6 +149,8 @@ main (int argc, GError *error = NULL; GOptionContext *context; + setlocale (LC_ALL, ""); + g_set_prgname ("mc-wait-for-name"); context = g_option_context_new ("- wait for a bus name"); -- cgit v1.2.1 From 78d8c53b930323455bb7c4031903f46717b8a174 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Mon, 15 Aug 2016 11:37:24 +0300 Subject: tests: make tests work again when NM support is enabled Apparently the nm library also tries to access the /.../Settings object of NM, which was not available in our fake NM implementation. This commit implements the basic properties of the Settings object, which allows the tests to continue past this point. https://bugs.freedesktop.org/show_bug.cgi?id=96917 --- tests/twisted/fakeconnectivity.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/twisted/fakeconnectivity.py b/tests/twisted/fakeconnectivity.py index 02d577fb..846dd767 100644 --- a/tests/twisted/fakeconnectivity.py +++ b/tests/twisted/fakeconnectivity.py @@ -6,7 +6,9 @@ import sys class FakeConnectivity(object): NM_BUS_NAME = 'org.freedesktop.NetworkManager' NM_PATH = '/org/freedesktop/NetworkManager' + NM_PATH_SETTINGS = NM_PATH + '/Settings' NM_INTERFACE = NM_BUS_NAME + NM_INTERFACE_SETTINGS = NM_INTERFACE + '.Settings' NM_STATE_UNKNOWN = 0 NM_STATE_ASLEEP = 10 @@ -47,6 +49,13 @@ class FakeConnectivity(object): q.add_dbus_method_impl(self.NM_GetDevices, path=self.NM_PATH, interface=self.NM_INTERFACE, method='GetDevices') + q.add_dbus_method_impl(self.NM_Settings_Get, + path=self.NM_PATH_SETTINGS, interface=dbus.PROPERTIES_IFACE, method='Get', + predicate=lambda e: e.args[0] == self.NM_INTERFACE_SETTINGS) + q.add_dbus_method_impl(self.NM_Settings_GetAll, + path=self.NM_PATH_SETTINGS, interface=dbus.PROPERTIES_IFACE, method='GetAll', + predicate=lambda e: e.args[0] == self.NM_INTERFACE_SETTINGS) + q.add_dbus_method_impl(self.ConnMan_GetProperties, path=self.CONNMAN_PATH, interface=self.CONNMAN_INTERFACE, method='GetProperties') @@ -92,6 +101,19 @@ class FakeConnectivity(object): def NM_GetDevices(self, e): self.q.dbus_return(e.message, [], signature='ao') + def nm_settings_props(self): + return { + 'CanModify': False, + 'Hostname': 'localhost', + 'Connections': dbus.Array([], signature='o'), + } + + def NM_Settings_Get(self, e): + self.q.dbus_return(e.message, self.nm_settings_props()[e.args[1]], signature='v') + + def NM_Settings_GetAll(self, e): + self.q.dbus_return(e.message, self.nm_settings_props(), signature='a{sv}') + def Connman_props(self): return { 'OfflineMode': False, -- cgit v1.2.1 From 6a93bfeab23d64216cb5084f2d63c18f12ab6844 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Thu, 1 Sep 2016 21:19:34 +0300 Subject: tests: fix race condition in account-manager/avatar.py test It seems that the order of the dbus signals is unpredictable, so requiring it in the test sometimes makes it fail. It also seems that the other checks above in the same unit test have the same logic of not expecting a certain order in signal emission, so this is probably the right thing to do. --- tests/twisted/account-manager/avatar.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/twisted/account-manager/avatar.py b/tests/twisted/account-manager/avatar.py index 9677e8a5..353c8992 100644 --- a/tests/twisted/account-manager/avatar.py +++ b/tests/twisted/account-manager/avatar.py @@ -162,10 +162,8 @@ def test(q, bus, mc): interface=cs.TEST_DBUS_ACCOUNT_PLUGIN_IFACE, signal='DeferringSetAttribute', args=[account.object_path, 'AvatarMime', '']), - ) - q.expect('dbus-signal', path=account.object_path, - interface=cs.ACCOUNT_IFACE_AVATAR, signal='AvatarChanged') - q.expect_many( + EventPattern('dbus-signal', path=account.object_path, + interface=cs.ACCOUNT_IFACE_AVATAR, signal='AvatarChanged'), EventPattern('dbus-signal', interface=cs.TEST_DBUS_ACCOUNT_PLUGIN_IFACE, signal='CommittingOne', -- cgit v1.2.1 From e49b61b4e0f94f2e740ff5a0d231b43f37ab7d1b Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Thu, 1 Sep 2016 21:50:50 +0300 Subject: Update NEWS --- NEWS | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/NEWS b/NEWS index 7f2f682d..ddc41b0f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,26 @@ +telepathy-mission-control 5.16.4 (UNRELEASED) +============================================= + +The "get modern" release. + +Fixes: + +• exit gracefully at startup if the D-Bus connection fails (Guillaume) +• fix some warnings when building with clang (fd.o #94310, Ting-Wei Lan) +• fix unit tests to work with GLib >= 2.46 (fd.o #96763, George Kiagiadakis) +• mc-wait-for-name now shows readable output on the command line on + exotic locales (fd.o #93661, Ting-Wei Lan) +• UPower support is now disabled by default if UPower is >= 0.99. + The features needed have now moved to logind, which is supported + in MC since 5.15.1 (fd.o #70458, George Kiagiadakis) + +Dependencies: + +• GLib 2.46 is now required +• NetworkManager support was ported to use libnm instead of the + deprecated libnm-glib (fd.o #96707, Diane Trout) + + telepathy-mission-control 5.16.3 (2014-08-25) ============================================= -- cgit v1.2.1 From 43afd2866bc38efe1b2cf27989df4e36ddd21201 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 20 Mar 2014 12:51:18 +0000 Subject: fix memory leaks: dbus_g_method_get_sender returns a copy We were semi-consistently using it wrong. --- src/mcd-dispatch-operation.c | 12 ++++++------ src/mcd-dispatcher.c | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c index 0f2850fe..4948b6be 100644 --- a/src/mcd-dispatch-operation.c +++ b/src/mcd-dispatch-operation.c @@ -521,10 +521,7 @@ _mcd_dispatch_operation_check_client_locks (McdDispatchOperation *self) /* if we've been claimed, respond, then do not call HandleChannels */ if (approval != NULL && approval->type == APPROVAL_TYPE_CLAIM) { - /* this needs to be copied because we don't use it til after we've - * freed approval->context */ - gchar *caller = g_strdup (dbus_g_method_get_sender ( - approval->context)); + gchar *caller = dbus_g_method_get_sender (approval->context); /* remove this approval from the list, so it won't be treated as a * failure */ @@ -827,13 +824,16 @@ _mcd_dispatch_operation_finish (McdDispatchOperation *operation, approval != NULL; approval = g_queue_pop_head (priv->approvals)) { + gchar *caller; + switch (approval->type) { case APPROVAL_TYPE_CLAIM: /* someone else got it - either another Claim() or a handler */ g_assert (approval->context != NULL); - DEBUG ("denying Claim call from %s", - dbus_g_method_get_sender (approval->context)); + caller = dbus_g_method_get_sender (approval->context); + DEBUG ("denying Claim call from %s", caller); + g_free (caller); dbus_g_method_return_error (approval->context, priv->result); approval->context = NULL; break; diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c index 5fea7f27..2fc08286 100644 --- a/src/mcd-dispatcher.c +++ b/src/mcd-dispatcher.c @@ -2123,7 +2123,7 @@ dispatcher_delegate_channels ( { McdDispatcher *self = (McdDispatcher *) iface; GError *error = NULL; - const gchar *sender; + gchar *sender = NULL; McdConnection *conn = NULL; DelegateChannelsCtx *ctx = NULL; McdAccountManager *am; @@ -2208,11 +2208,13 @@ dispatcher_delegate_channels ( try_delegating (to_delegate); } + g_free (sender); g_object_unref (am); return; error: + g_free (sender); dbus_g_method_return_error (context, error); g_error_free (error); -- cgit v1.2.1 From f576a9e8a125c16e3a562e3bb820707c1041af5c Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 20 Mar 2014 12:53:39 +0000 Subject: dispatcher_delegate_channels: initialize am Otherwise, if we "goto error" too soon, we'll try to g_object_unref uninitialized memory. gcc doesn't spot that because we're using tp_clear_object, which uses an intermediate variable, and it doesn't propagate "uninitializedness" through assignments. --- src/mcd-dispatcher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c index 2fc08286..b004b096 100644 --- a/src/mcd-dispatcher.c +++ b/src/mcd-dispatcher.c @@ -2126,7 +2126,7 @@ dispatcher_delegate_channels ( gchar *sender = NULL; McdConnection *conn = NULL; DelegateChannelsCtx *ctx = NULL; - McdAccountManager *am; + McdAccountManager *am = NULL; guint i; GList *l; -- cgit v1.2.1 From 74d553d4125224f0a95c9d2843d38861b42eae9f Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Fri, 2 Sep 2016 22:27:30 +0300 Subject: 5.16.4 --- NEWS | 3 ++- configure.ac | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index ddc41b0f..7596c731 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -telepathy-mission-control 5.16.4 (UNRELEASED) +telepathy-mission-control 5.16.4 (2016-09-02) ============================================= The "get modern" release. @@ -13,6 +13,7 @@ Fixes: • UPower support is now disabled by default if UPower is >= 0.99. The features needed have now moved to logind, which is supported in MC since 5.15.1 (fd.o #70458, George Kiagiadakis) +• fix some memory leaks and a potential crash (fd.o #76401, Simon) Dependencies: diff --git a/configure.ac b/configure.ac index 6d2f9d74..1bcf8521 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Set the version number to e.g. 5.x.y immediately before a release. dnl Set the version number to e.g. 5.x.y+ immediately after (this will dnl enable -Werror). -AC_INIT([telepathy-mission-control], [5.16.3+]) +AC_INIT([telepathy-mission-control], [5.16.4]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) -- cgit v1.2.1 From 6077a834bab2c725d7f55378e7f39c1f1d409eaa Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Fri, 2 Sep 2016 22:53:49 +0300 Subject: nano flag --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1bcf8521..cf9d290f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Set the version number to e.g. 5.x.y immediately before a release. dnl Set the version number to e.g. 5.x.y+ immediately after (this will dnl enable -Werror). -AC_INIT([telepathy-mission-control], [5.16.4]) +AC_INIT([telepathy-mission-control], [5.16.4+]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) -- cgit v1.2.1 From 19f10ec2a59cadd4c59d6bc3147c612007c1c615 Mon Sep 17 00:00:00 2001 From: Tiago Salem Herrmann Date: Wed, 25 Jan 2017 15:30:04 -0200 Subject: Fix string max size calculation. Reviewed-by: George Kiagiadakis https://github.com/TelepathyIM/telepathy-mission-control/pull/1 --- src/mcd-connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mcd-connection.c b/src/mcd-connection.c index e225da2c..fe7029fd 100644 --- a/src/mcd-connection.c +++ b/src/mcd-connection.c @@ -1396,7 +1396,7 @@ translate_g_error (GQuark domain, if (p != NULL) { - gchar *tmp = g_strndup (message, message - p); + gchar *tmp = g_strndup (message, p - message); /* The syntactic restrictions for error names are the same * as for interface names. */ -- cgit v1.2.1