+static void
+set_service_cb (GObject *source,
+ GAsyncResult *result,
+ gpointer user_data)
+{
+ GError *error = NULL;
+
+ if (!tp_account_set_service_finish (TP_ACCOUNT (source), result, &error))
+ {
+ DEBUG ("Failed to set Account.Service: %s", error->message);
+ g_error_free (error);
+ }
+}
+
+static void
+update_account_service (EmpathyAccountSettings *self)
+{
+ EmpathyAccountSettingsPriv *priv = GET_PRIV (self);
+
+ if (!priv->update_service)
+ return;
+
+ tp_account_set_service_async (priv->account,
+ priv->service != NULL ? priv->service : "", set_service_cb, self);
+}
+