From cb3419045c8302148bbd0056e74a350a9ce39dd5 Mon Sep 17 00:00:00 2001 From: Andrew Walbran Date: Mon, 25 Aug 2008 23:53:42 +1200 Subject: [PATCH] Checking protocol --- twitterpathy.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/twitterpathy.rb b/twitterpathy.rb index 743164c..a6dbb7b 100755 --- a/twitterpathy.rb +++ b/twitterpathy.rb @@ -22,6 +22,7 @@ class Twitterpathy < DBus::Object dbus_interface "org.freedesktop.Telepathy.ConnectionManager" do dbus_method :GetParameters, "in proto:s, out parameters:a(susv)" do |proto| puts "GetParameters(#{proto})" + $stderr.puts "Attempt to use unsupported protocol #{proto}" if proto != 'twitter' parameters = [['account', CONN_MGR_PARAM_FLAG_REQUIRED | CONN_MGR_PARAM_FLAG_REGISTER, 's', ['s', '']], ['password', CONN_MGR_PARAM_FLAG_REQUIRED | CONN_MGR_PARAM_FLAG_REGISTER | CONN_MGR_PARAM_FLAG_SECRET, 's', ['s', '']]] [parameters] end @@ -34,6 +35,7 @@ class Twitterpathy < DBus::Object dbus_method :RequestConnection, "in proto:s, in parameters:a{sv}, out service:s, out object:o" do |proto, parameters| puts "RequestConnection(#{proto}, #{parameters})" + $stderr.puts "Attempt to use unsupported protocol #{proto}" if proto != 'twitter' service = nil object = nil [service, object] -- 2.11.4.GIT