summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorParthiban Balasubramanian <parthibanbalu1@gmail.com>2015-05-04 13:54:09 -0600
committerJens Georg <mail@jensge.org>2015-05-07 21:06:35 +0200
commitaa1e126b8e09a83eb48f47a048eb6ac4506d8a46 (patch)
treee824cf649179a7d83f0f22068c306d22802bcd52 /src
parent79b401776c9399339a9100ce46ecf26c55d84fdb (diff)
downloadrygel-aa1e126b8e09a83eb48f47a048eb6ac4506d8a46.tar.gz
ruih: Check for mandatory arguments
GetCompatibleUI action must check for 2 mandatory arguments with the action. Both the arguments can be empty but the element needs to be sent out in the request.
Diffstat (limited to 'src')
-rw-r--r--src/librygel-ruih/rygel-ruih-service.vala5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/librygel-ruih/rygel-ruih-service.vala b/src/librygel-ruih/rygel-ruih-service.vala
index ba2cccfb..acc88e77 100644
--- a/src/librygel-ruih/rygel-ruih-service.vala
+++ b/src/librygel-ruih/rygel-ruih-service.vala
@@ -59,6 +59,11 @@ internal class Rygel.RuihService: Service {
out input_device_profile);
action.get ("UIFilter", typeof (string), out input_ui_filter);
+ if (action.get_argument_count () < 2) {
+ action.return_error (402, _("Invalid argument"));
+ return;
+ }
+
try {
var manager = RuihServiceManager.get_default ();
var compat_ui = manager.get_compatible_uis (input_device_profile,