[rygel] ruih: Check for mandatory arguments
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] ruih: Check for mandatory arguments
- Date: Thu, 7 May 2015 19:07:20 +0000 (UTC)
commit aa1e126b8e09a83eb48f47a048eb6ac4506d8a46
Author: Parthiban Balasubramanian <parthibanbalu1 gmail com>
Date: Mon May 4 13:54:09 2015 -0600
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.
src/librygel-ruih/rygel-ruih-service.vala | 5 +++++
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 ba2cccf..acc88e7 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]