summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-09-17 13:17:39 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-09-17 13:17:39 +0100
commit8f96d1f2789e7644d5208a101f7ee98433852d81 (patch)
tree51e92d92ee21042d193660076f953c585e381fd4
parentb7bc18e86954708dad8936af05bf71648fde6c2b (diff)
parent22ce928565f6b6897fb73ed80e597fed890dc189 (diff)
downloadtelepathy-glib-8f96d1f2789e7644d5208a101f7ee98433852d81.tar.gz
Merge remote-tracking branch 'cassidy/tartan' into next
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=79361
-rw-r--r--examples/client/dbus-tubes/offerer.c2
-rw-r--r--examples/client/media-observer.c4
-rw-r--r--telepathy-glib/account.c5
-rw-r--r--telepathy-glib/channel.c2
-rw-r--r--telepathy-glib/connection.c6
-rw-r--r--telepathy-glib/dbus-tube-channel.c2
-rw-r--r--telepathy-glib/dbus.c7
-rw-r--r--telepathy-glib/debug.c9
-rw-r--r--telepathy-glib/handle-repo.c7
-rw-r--r--telepathy-glib/util.c6
-rw-r--r--telepathy-logger/debug.c12
-rw-r--r--telepathy-logger/log-store-pidgin.c7
-rw-r--r--tests/dbus/account.c6
-rw-r--r--tests/dbus/cli-group.c17
-rw-r--r--tests/dbus/dbus-tube.c2
15 files changed, 70 insertions, 24 deletions
diff --git a/examples/client/dbus-tubes/offerer.c b/examples/client/dbus-tubes/offerer.c
index db5165ca1..73d5c58ee 100644
--- a/examples/client/dbus-tubes/offerer.c
+++ b/examples/client/dbus-tubes/offerer.c
@@ -56,7 +56,7 @@ handle_method_call (
}
else /* hooray! */
{
- guint x, y;
+ gint x, y;
gboolean ret;
g_variant_get (parameters, "(ii)", &x, &y);
diff --git a/examples/client/media-observer.c b/examples/client/media-observer.c
index 0fe95e53f..5e4300522 100644
--- a/examples/client/media-observer.c
+++ b/examples/client/media-observer.c
@@ -51,7 +51,9 @@ observe_channel_cb (TpSimpleObserver *self,
requested? "to": "from",
tp_channel_get_identifier (channel));
- g_signal_connect (g_object_ref (channel), "invalidated",
+ g_object_ref (channel);
+
+ g_signal_connect (channel, "invalidated",
G_CALLBACK (chan_invalidated_cb), NULL);
tp_observe_channel_context_accept (context);
diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index c245b6bc9..cec883c76 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -395,8 +395,9 @@ tp_account_init (TpAccount *self)
static void
_tp_account_invalidated_cb (TpAccount *self,
guint domain,
- guint code,
- gchar *message)
+ gint code,
+ gchar *message,
+ gpointer user_data)
{
TpAccountPrivate *priv = self->priv;
diff --git a/telepathy-glib/channel.c b/telepathy-glib/channel.c
index a35b4372e..d7df915aa 100644
--- a/telepathy-glib/channel.c
+++ b/telepathy-glib/channel.c
@@ -880,7 +880,7 @@ tp_channel_closed_cb (TpChannel *self,
static void
tp_channel_connection_invalidated_cb (TpConnection *conn,
guint domain,
- guint code,
+ gint code,
gchar *message,
TpChannel *self)
{
diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c
index f88611f50..15a3be6dc 100644
--- a/telepathy-glib/connection.c
+++ b/telepathy-glib/connection.c
@@ -1027,7 +1027,11 @@ tp_connection_status_changed_cb (TpConnection *self,
}
static void
-tp_connection_invalidated (TpConnection *self)
+tp_connection_invalidated (TpConnection *self,
+ guint domain,
+ gint code,
+ gchar *message,
+ gpointer user_data)
{
if (self->priv->introspection_call != NULL)
{
diff --git a/telepathy-glib/dbus-tube-channel.c b/telepathy-glib/dbus-tube-channel.c
index 60dc2c013..2dfbf78b4 100644
--- a/telepathy-glib/dbus-tube-channel.c
+++ b/telepathy-glib/dbus-tube-channel.c
@@ -166,7 +166,7 @@ static void
complete_operation (TpDBusTubeChannel *self)
{
TpDBusTubeChannelPrivate *priv = self->priv;
- GSimpleAsyncResult *result = priv->result;
+ GSimpleAsyncResult *result;
/* This dance is to ensure that we don't accidentally manipulate priv->result
* while calling out to user code. For instance, someone might call
diff --git a/telepathy-glib/dbus.c b/telepathy-glib/dbus.c
index 552e0fd42..0e3bf2697 100644
--- a/telepathy-glib/dbus.c
+++ b/telepathy-glib/dbus.c
@@ -527,6 +527,7 @@ tp_dbus_connection_request_name (GDBusConnection *dbus_connection,
guint32 result;
g_return_val_if_fail (G_IS_DBUS_CONNECTION (dbus_connection), FALSE);
+ g_return_val_if_fail (well_known_name != NULL, FALSE);
g_return_val_if_fail (tp_dbus_check_valid_bus_name (well_known_name,
TP_DBUS_NAME_TYPE_WELL_KNOWN, error), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
@@ -609,6 +610,7 @@ tp_dbus_connection_release_name (GDBusConnection *dbus_connection,
GVariant *tuple;
g_return_val_if_fail (G_IS_DBUS_CONNECTION (dbus_connection), FALSE);
+ g_return_val_if_fail (well_known_name != NULL, FALSE);
g_return_val_if_fail (tp_dbus_check_valid_bus_name (well_known_name,
TP_DBUS_NAME_TYPE_WELL_KNOWN, error), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
@@ -777,6 +779,10 @@ tp_dbus_connection_register_object (GDBusConnection *dbus_connection,
{
GError *error = NULL;
+ g_return_if_fail (G_IS_DBUS_CONNECTION (dbus_connection));
+ g_return_if_fail (object_path != NULL);
+ g_return_if_fail (object != NULL);
+
if (!tp_dbus_connection_try_register_object (dbus_connection, object_path,
object, &error))
{
@@ -909,6 +915,7 @@ tp_dbus_connection_try_register_object (GDBusConnection *dbus_connection,
gpointer iface_name_p;
g_return_val_if_fail (G_IS_DBUS_CONNECTION (dbus_connection), FALSE);
+ g_return_val_if_fail (object_path != NULL, FALSE);
g_return_val_if_fail (tp_dbus_check_valid_object_path (object_path, error),
FALSE);
g_return_val_if_fail (G_IS_OBJECT (object), FALSE);
diff --git a/telepathy-glib/debug.c b/telepathy-glib/debug.c
index f8ffc66da..efc902a18 100644
--- a/telepathy-glib/debug.c
+++ b/telepathy-glib/debug.c
@@ -146,8 +146,8 @@ static DebugKeyToDomain key_to_domain[] = {
/**
* tp_debug_set_flags:
- * @flags_string: The flags to set, comma-separated. If %NULL or empty,
- * no additional flags are set.
+ * @flags_string: (nullable): The flags to set, comma-separated. If %NULL or
+ * empty, no additional flags are set.
*
* Set the debug flags indicated by @flags_string, in addition to any already
* set.
@@ -345,7 +345,7 @@ tp_debug_divert_messages (const gchar *filename)
* @log_domain: the message's log domain
* @log_level: the log level of the message
* @message: the message to process
- * @ignored: not used
+ * @ignored: (nullable): not used
*
* A #GLogFunc that prepends the UTC time (currently in ISO 8601 format,
* with microsecond resolution) to the message, then calls
@@ -375,6 +375,9 @@ tp_debug_timestamped_log_handler (const gchar *log_domain,
GTimeVal now;
gchar *tmp, *now_str;
+ g_return_if_fail (log_domain != NULL);
+ g_return_if_fail (message != NULL);
+
g_get_current_time (&now);
now_str = g_time_val_to_iso8601 (&now);
tmp = g_strdup_printf ("%s: %s", now_str, message);
diff --git a/telepathy-glib/handle-repo.c b/telepathy-glib/handle-repo.c
index 955cbe91c..8633453b7 100644
--- a/telepathy-glib/handle-repo.c
+++ b/telepathy-glib/handle-repo.c
@@ -121,6 +121,8 @@ tp_handles_are_valid_variant (TpHandleRepoIface *self,
GArray *arr;
gboolean result;
+ g_return_val_if_fail (TP_IS_HANDLE_REPO_IFACE (self), FALSE);
+ g_return_val_if_fail (handles != NULL, FALSE);
g_return_val_if_fail (g_variant_is_of_type (handles, G_VARIANT_TYPE ("au")),
FALSE);
@@ -162,7 +164,7 @@ tp_handle_inspect (TpHandleRepoIface *self,
* tp_handle_ensure:
* @self: A handle repository implementation
* @id: A string whose handle is required
- * @context: User data to be passed to the normalization callback
+ * @context: (nullable): User data to be passed to the normalization callback
* @error: Used to return an error if 0 is returned
*
* Return a handle for the given string, creating one if necessary. The string
@@ -178,6 +180,9 @@ tp_handle_ensure (TpHandleRepoIface *self,
gpointer context,
GError **error)
{
+ g_return_val_if_fail (TP_IS_HANDLE_REPO_IFACE (self), 0);
+ g_return_val_if_fail (id != NULL, 0);
+
return TP_HANDLE_REPO_IFACE_GET_CLASS (self)->ensure_handle (self,
id, context, error);
}
diff --git a/telepathy-glib/util.c b/telepathy-glib/util.c
index a3f36d7a0..502e50c2e 100644
--- a/telepathy-glib/util.c
+++ b/telepathy-glib/util.c
@@ -752,10 +752,10 @@ tp_weak_ref_destroy (TpWeakRef *self)
/**
* tp_simple_async_report_success_in_idle:
- * @source: (allow-none): the source object
+ * @source: (nullable): the source object
* @callback: (scope async): the callback
- * @user_data: (closure): user data for @callback
- * @source_tag: the source tag for the #GSimpleAsyncResult
+ * @user_data: (nullable) (closure): user data for @callback
+ * @source_tag: (nullable): the source tag for the #GSimpleAsyncResult
*
* Create a new #GSimpleAsyncResult with no operation result, and call
* g_simple_async_result_complete_in_idle() on it.
diff --git a/telepathy-logger/debug.c b/telepathy-logger/debug.c
index 10f9bb4c2..3639f301d 100644
--- a/telepathy-logger/debug.c
+++ b/telepathy-logger/debug.c
@@ -41,6 +41,18 @@ static GDebugKey keys[] = {
{ 0, },
};
+/**
+ * tpl_debug_set_flags:
+ * @flags_string: (nullable): The flags to set, comma-separated.
+ * If %NULL or empty, no additional flags are set.
+ *
+ * Set the debug flags indicated by flags_string, in addition to any
+ * already set.
+ *
+ * The parsing matches that of g_parse_debug_string().
+ *
+ * Since: UNRELEASED
+ */
void
tpl_debug_set_flags (const gchar *flags_string)
{
diff --git a/telepathy-logger/log-store-pidgin.c b/telepathy-logger/log-store-pidgin.c
index 2aff34fe4..22e82a201 100644
--- a/telepathy-logger/log-store-pidgin.c
+++ b/telepathy-logger/log-store-pidgin.c
@@ -500,16 +500,15 @@ log_store_pidgin_dup_account (TplLogStorePidgin *self,
{
TpAccount *acc = (TpAccount *) l->data;
GVariant *params;
- const gchar *account_param, *server_param;
+ const gchar *account_param = NULL, *server_param = NULL;
if (tp_strdiff (tp_account_get_protocol_name (acc), protocol))
continue;
params = tp_account_dup_parameters (acc);
- g_variant_lookup (params,
- "account", "&s", &account_param,
- "server", "&s", &server_param);
+ g_variant_lookup (params, "account", "&s", &account_param);
+ g_variant_lookup (params, "server", "&s", &server_param);
if (!tp_strdiff (username, account_param))
{
diff --git a/tests/dbus/account.c b/tests/dbus/account.c
index 036d485d2..34922de55 100644
--- a/tests/dbus/account.c
+++ b/tests/dbus/account.c
@@ -154,9 +154,9 @@ test_get_times_notified (Test *test,
}
static void
-test_notify_cb (Test *test,
+test_notify_cb (TpAccount *account,
GParamSpec *pspec,
- TpAccount *account)
+ Test *test)
{
guint counter = test_get_times_notified (test, pspec->name);
@@ -176,7 +176,7 @@ test_set_up_account_notify (Test *test)
g_signal_handler_disconnect (test->account, test->notify_id);
}
- test->notify_id = g_signal_connect_swapped (test->account, "notify",
+ test->notify_id = g_signal_connect (test->account, "notify",
G_CALLBACK (test_notify_cb), test);
}
diff --git a/tests/dbus/cli-group.c b/tests/dbus/cli-group.c
index 609e75638..f2dcc1b8d 100644
--- a/tests/dbus/cli-group.c
+++ b/tests/dbus/cli-group.c
@@ -210,13 +210,26 @@ check_invalidated_unknown_error_cb (TpProxy *proxy,
}
static void
+quit_cb (TpChannel *chan_,
+ GPtrArray *added,
+ GPtrArray *removed,
+ GPtrArray *local_pending,
+ GPtrArray *remote_pending,
+ TpContact *actor,
+ GVariant *details,
+ GMainLoop *loop)
+{
+ g_main_loop_quit (loop);
+}
+
+static void
run_until_members_changed (TpChannel *channel)
{
GMainLoop *loop = g_main_loop_new (NULL, FALSE);
gulong id;
- id = g_signal_connect_swapped (channel, "group-members-changed",
- G_CALLBACK (g_main_loop_quit), loop);
+ id = g_signal_connect (channel, "group-members-changed",
+ G_CALLBACK (quit_cb), loop);
g_main_loop_run (loop);
diff --git a/tests/dbus/dbus-tube.c b/tests/dbus/dbus-tube.c
index fd72421a6..a8ff9f9e0 100644
--- a/tests/dbus/dbus-tube.c
+++ b/tests/dbus/dbus-tube.c
@@ -265,7 +265,7 @@ handle_double_call (GDBusConnection *connection,
{
if (!tp_strdiff (method_name, "Double"))
{
- guint value;
+ gint value;
g_variant_get (parameters, "(i)", &value);