summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <gkiagia@tolabaki.gr>2017-01-28 13:43:05 +0200
committerGeorge Kiagiadakis <gkiagia@tolabaki.gr>2017-01-28 13:43:05 +0200
commitcce7b6a3d2f6ca95e937a16983bb7d6487641be7 (patch)
treea28581ced33d4d43cc265e193cb7ba5c60f5e792
parent190de711459a51eb236b773a57b0c188ebf1da6a (diff)
parent19f10ec2a59cadd4c59d6bc3147c612007c1c615 (diff)
downloadtelepathy-mission-control-cce7b6a3d2f6ca95e937a16983bb7d6487641be7.tar.gz
Merge branch 'telepathy-mission-control-5.16'
-rw-r--r--NEWS42
-rw-r--r--configure.ac8
-rw-r--r--server/mc-server.c2
-rw-r--r--src/connectivity-monitor.c39
-rw-r--r--src/mcd-account-manager.c2
-rw-r--r--src/mcd-account.c2
-rw-r--r--src/mcd-connection.c4
-rw-r--r--src/mcd-dispatch-operation.c14
-rw-r--r--src/mcd-dispatcher.c6
-rw-r--r--tests/twisted/fake-network-monitor.c16
-rw-r--r--tests/twisted/fakeconnectivity.py22
-rw-r--r--util/wait-for-name.c3
12 files changed, 121 insertions, 39 deletions
diff --git a/NEWS b/NEWS
index 801d1af0..c8a7e4f9 100644
--- a/NEWS
+++ b/NEWS
@@ -75,8 +75,50 @@ Fixes:
suspending" on systems with either systemd-logind, or a reimplementation
with the same D-Bus API. (fd.o #70458, Simon)
+telepathy-mission-control 5.16.4 (2016-09-02)
+=============================================
+
+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)
+• fix some memory leaks and a potential crash (fd.o #76401, Simon)
+
+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)
+=============================================
+
+Fixes:
+
+• mcd-connection: use tp_asv_new() properly (fd.o #81751, Steffen Kieß)
+
+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 5be3c80c..d1f7e37e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -165,7 +165,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.36, 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],
[
@@ -175,8 +175,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_36], [Prevent post 2.36 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])
# -----------------------------------------------------------
# Connectivity integration
@@ -193,7 +193,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/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);
diff --git a/src/connectivity-monitor.c b/src/connectivity-monitor.c
index 288d6f54..e4af960a 100644
--- a/src/connectivity-monitor.c
+++ b/src/connectivity-monitor.c
@@ -32,7 +32,7 @@
#endif
#ifdef HAVE_NM
-#include <nm-client.h>
+#include <NetworkManager.h>
#endif
#include <telepathy-glib/telepathy-glib.h>
@@ -182,10 +182,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,
@@ -202,9 +198,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);
@@ -487,19 +481,24 @@ mcd_connectivity_monitor_init (McdConnectivityMonitor *connectivity_monitor)
#endif
#ifdef HAVE_NM
- priv->nm_client = nm_client_new ();
- 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");
- }
+ {
+ 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
g_bus_get (G_BUS_TYPE_SYSTEM, NULL, got_system_bus_cb,
diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c
index 59693cbc..ec06908d 100644
--- a/src/mcd-account-manager.c
+++ b/src/mcd-account-manager.c
@@ -68,7 +68,7 @@ static const McdInterfaceData account_manager_interfaces[] = {
MCD_IMPLEMENT_IFACE (tp_svc_account_manager_get_type,
account_manager,
TP_IFACE_ACCOUNT_MANAGER),
- { 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 d53c74b2..c44c7081 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -74,7 +74,7 @@ static const McdInterfaceData account_interfaces[] = {
account_addressing,
TP_IFACE_ACCOUNT_INTERFACE_ADDRESSING),
- { G_TYPE_INVALID, }
+ { NULL, }
};
G_DEFINE_TYPE_WITH_CODE (McdAccount, mcd_account, G_TYPE_OBJECT,
diff --git a/src/mcd-connection.c b/src/mcd-connection.c
index 190beec3..066deba2 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -1335,7 +1335,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. */
@@ -2210,7 +2210,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,
diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index 5299a5b3..4abaf078 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,
@@ -519,10 +519,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 */
@@ -825,13 +822,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 8275e5ef..3e6e1c16 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -1969,10 +1969,10 @@ dispatcher_delegate_channels (
{
McdDispatcher *self = (McdDispatcher *) iface;
GError *error = NULL;
- const gchar *sender;
+ gchar *sender = NULL;
McdConnection *conn = NULL;
DelegateChannelsCtx *ctx = NULL;
- McdAccountManager *am;
+ McdAccountManager *am = NULL;
guint i;
GList *l;
@@ -2054,11 +2054,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);
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
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,
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 <glib.h>
+#include <locale.h>
#include <telepathy-glib/telepathy-glib.h>
#include <telepathy-glib/telepathy-glib-dbus.h>
@@ -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");