core: Correct handling of an N/A config
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Fri, 17 Dec 2010 15:23:16 +0000 (17:23 +0200)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Tue, 11 Jan 2011 17:18:06 +0000 (19:18 +0200)
If a configuration key is not available from a configuration source, we should
be throwing the appropriate error.

src/rygel/rygel-environment-config.vala

index 4f62abe..20866bd 100644 (file)
@@ -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 {