From 7622efbbce028096c6301c014537135c40bc66a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20Jard=C3=B3n?= Date: Tue, 14 Jun 2011 15:43:54 +0100 Subject: [PATCH] moonshot-dbus-server: Only return if we choose a ID card that has the requested service --- src/moonshot-dbus-server.vala | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/moonshot-dbus-server.vala b/src/moonshot-dbus-server.vala index 7eb1b4b..d05db50 100644 --- a/src/moonshot-dbus-server.vala +++ b/src/moonshot-dbus-server.vala @@ -15,12 +15,20 @@ public class MoonshotServer : Object { out string password_out, out string certificate_out) { + bool has_service = false; + main_window.set_callback (get_identity.callback); yield; var id_card = this.main_window.selected_id_card_widget.id_card; - if (id_card.nai == nai || id_card.password == password) + foreach (string id_card_service in id_card.services) + { + if (id_card_service == service) + has_service = true; + } + + if (has_service) { nai_out = id_card.nai; password_out = id_card.password; -- 2.1.4