diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-03-24 18:19:25 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-03-24 18:19:25 +0000 |
commit | b0c4579e37b4d45f46d0947b3d7f61f55cc9473b (patch) | |
tree | 118aa903c13852ceb58dde34ad7cb1d802f02171 | |
parent | 09805764d468cce9076244789952e7a715cdeaa8 (diff) |
Replace dbus_g_method_return_error with g_dbus_method_invocation_return_gerror
Excluding glib-ginterface-gen.py.
Automated:
git grep -lz dbus_g_method_return_error |
xargs -0 perl -pi -e 's/\bdbus_g_method_return_error\b/g_dbus_method_invocation_return_gerror/g'
-rw-r--r-- | src/idle-connection.c | 8 | ||||
-rw-r--r-- | src/idle-contact-info.c | 6 | ||||
-rw-r--r-- | src/idle-muc-channel.c | 6 | ||||
-rw-r--r-- | src/idle-roomlist-channel.c | 2 | ||||
-rw-r--r-- | src/tls-certificate.c | 6 |
5 files changed, 14 insertions, 14 deletions
diff --git a/src/idle-connection.c b/src/idle-connection.c index 323d19e..be913d6 100644 --- a/src/idle-connection.c +++ b/src/idle-connection.c @@ -1344,7 +1344,7 @@ static void idle_connection_request_aliases(TpSvcConnectionInterfaceAliasing1 *i const gchar **aliases; if (!tp_handles_are_valid(repo, handles, FALSE, &error)) { - dbus_g_method_return_error(context, error); + g_dbus_method_invocation_return_gerror(context, error); g_error_free(error); return; } @@ -1369,7 +1369,7 @@ static gboolean _send_rename_request(IdleConnection *obj, const gchar *nick, DBu GError error = {TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Invalid nickname requested"}; IDLE_DEBUG("failed to get handle for \"%s\"", nick); - dbus_g_method_return_error(context, &error); + g_dbus_method_invocation_return_gerror(context, &error); return FALSE; } @@ -1397,7 +1397,7 @@ static void idle_connection_set_aliases(TpSvcConnectionInterfaceAliasing1 *iface if ((g_hash_table_size(aliases) != 1) || !requested_alias) { GError error = {TP_ERROR, TP_ERROR_NOT_AVAILABLE, "You can only set your own alias in IRC"}; - dbus_g_method_return_error(context, &error); + g_dbus_method_invocation_return_gerror(context, &error); return; } @@ -1598,7 +1598,7 @@ idle_connection_irc_command_send (IdleSvcConnectionInterfaceIRCCommand1 *iface, if (!check_irc_command (self, command, &error)) { - dbus_g_method_return_error (context, error); + g_dbus_method_invocation_return_gerror (context, error); g_error_free (error); return; } diff --git a/src/idle-contact-info.c b/src/idle-contact-info.c index 2245d4a..b8963fe 100644 --- a/src/idle-contact-info.c +++ b/src/idle-contact-info.c @@ -133,7 +133,7 @@ static void idle_connection_request_contact_info(TpSvcConnectionInterfaceContact TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED(base, context); if (!tp_handle_is_valid(contact_handles, contact, &error)) { - dbus_g_method_return_error(context, error); + g_dbus_method_invocation_return_gerror(context, error); g_error_free(error); return; } @@ -234,7 +234,7 @@ static IdleParserHandlerResult _no_such_server_handler(IdleParser *parser, IdleP goto cleanup; error = g_error_new(TP_ERROR, TP_ERROR_DOES_NOT_EXIST, "User '%s' unknown; they may have disconnected", server); - dbus_g_method_return_error(request->context, error); + g_dbus_method_invocation_return_gerror(request->context, error); g_error_free(error); _dequeue_request_contact_info(conn); @@ -268,7 +268,7 @@ static IdleParserHandlerResult _try_again_handler(IdleParser *parser, IdleParser msg = g_value_get_string(g_value_array_get_nth(args, 1)); error = g_error_new_literal(TP_ERROR, TP_ERROR_SERVICE_BUSY, msg); - dbus_g_method_return_error(request->context, error); + g_dbus_method_invocation_return_gerror(request->context, error); g_error_free(error); _dequeue_request_contact_info(conn); diff --git a/src/idle-muc-channel.c b/src/idle-muc-channel.c index e96d4f8..a3abe1f 100644 --- a/src/idle-muc-channel.c +++ b/src/idle-muc-channel.c @@ -1416,7 +1416,7 @@ static void idle_muc_channel_provide_password (TpSvcChannelInterfacePassword1 *i "don't need a password now or authentication already " "in progress (%s)", priv->channel_name); IDLE_DEBUG ("%s", error->message); - dbus_g_method_return_error(context, error); + g_dbus_method_invocation_return_gerror(context, error); g_error_free(error); return; } @@ -1466,14 +1466,14 @@ idle_muc_channel_set_subject ( GError *error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Can't set subject: not in the room (state=%s)", ascii_muc_states[priv->state]); - dbus_g_method_return_error (context, error); + g_dbus_method_invocation_return_gerror (context, error); g_clear_error (&error); } else if (!priv->can_set_topic) { GError error = { TP_ERROR, TP_ERROR_PERMISSION_DENIED, "The channel's +t and you're not an op" }; - dbus_g_method_return_error (context, &error); + g_dbus_method_invocation_return_gerror (context, &error); } else { diff --git a/src/idle-roomlist-channel.c b/src/idle-roomlist-channel.c index 03e26fc..5c08a2f 100644 --- a/src/idle-roomlist-channel.c +++ b/src/idle-roomlist-channel.c @@ -272,7 +272,7 @@ idle_roomlist_channel_stop_listing (TpSvcChannelTypeRoomList1 *iface, g_assert (IDLE_IS_ROOMLIST_CHANNEL (self)); - dbus_g_method_return_error (context, &error); + g_dbus_method_invocation_return_gerror (context, &error); /* priv->listing = FALSE; diff --git a/src/tls-certificate.c b/src/tls-certificate.c index 3d71be1..25226cf 100644 --- a/src/tls-certificate.c +++ b/src/tls-certificate.c @@ -272,7 +272,7 @@ idle_tls_certificate_accept (TpSvcAuthenticationTLSCertificate *cert, "doesn't make sense." }; - dbus_g_method_return_error (context, &error); + g_dbus_method_invocation_return_gerror (context, &error); return; } @@ -298,7 +298,7 @@ idle_tls_certificate_reject (TpSvcAuthenticationTLSCertificate *cert, GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Calling Reject() with a zero-length rejection list." }; - dbus_g_method_return_error (context, &error); + g_dbus_method_invocation_return_gerror (context, &error); return; } @@ -311,7 +311,7 @@ idle_tls_certificate_reject (TpSvcAuthenticationTLSCertificate *cert, "doesn't make sense." }; - dbus_g_method_return_error (context, &error); + g_dbus_method_invocation_return_gerror (context, &error); return; } |