[rygel] core: Correct handling of an N/A config



commit 4a08001bdf4fa87d42753c56284c76e696af2438
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Dec 17 17:23:16 2010 +0200

    core: Correct handling of an N/A config
    
    If a configuration key is not available from a configuration source, we should
    be throwing the appropriate error.

 src/rygel/rygel-environment-config.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/rygel/rygel-environment-config.vala b/src/rygel/rygel-environment-config.vala
index 4f62abe..20866bd 100644
--- a/src/rygel/rygel-environment-config.vala
+++ b/src/rygel/rygel-environment-config.vala
@@ -56,7 +56,7 @@ internal class Rygel.EnvironmentConfig : GLib.Object, Configuration {
 
     // This config doesn't make sense in this context.
     public bool get_upnp_enabled () throws GLib.Error {
-        return true;
+        throw new ConfigurationError.NO_VALUE_SET (_("No value available"));
     }
 
     public string get_interface () throws GLib.Error {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]