server: Always fill agent cache
authorJens Georg <jensg@openismus.com>
Sat, 13 Jul 2013 11:55:54 +0000 (13:55 +0200)
committerJens Georg <jensg@openismus.com>
Sun, 21 Jul 2013 08:37:57 +0000 (10:37 +0200)
src/librygel-server/rygel-client-hacks.vala

index 616fc53..291d9fa 100644 (file)
@@ -119,10 +119,6 @@ internal abstract class Rygel.ClientHacks : GLib.Object {
             agent = client_agent_cache.get (address.get_physical ());
         }
 
-        if (agent == null || !(this.agent_regex.match (agent))) {
-            throw new ClientHacksError.NA (_("Not Applicable"));
-        }
-
         if (agent != null) {
             var address = message.get_address ();
             if (client_agent_cache == null) {
@@ -130,5 +126,9 @@ internal abstract class Rygel.ClientHacks : GLib.Object {
             }
             client_agent_cache.set (address.get_physical (), agent);
         }
+
+        if (agent == null || !(this.agent_regex.match (agent))) {
+            throw new ClientHacksError.NA (_("Not Applicable"));
+        }
     }
 }