If target is not a URN, no need to deal with version
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Mon, 4 Jan 2010 17:12:26 +0000 (19:12 +0200)
committerRoss Burton <ross@linux.intel.com>
Mon, 25 Jan 2010 08:40:14 +0000 (08:40 +0000)
libgssdp/gssdp-resource-group.c

index 89980a5..9a98409 100644 (file)
@@ -1061,6 +1061,11 @@ create_target_regex (const char *target, GError **error)
         char *version;
         char *version_pattern;
 
+        if (strncmp (target, "urn:", 4) != 0) {
+                /* target is not a URN, No need to deal with version. */
+                return g_regex_new (target, 0, 0, error);
+        }
+
         version_pattern = "[0-9]+$";
         /* Make sure we have enough room for version pattern */
         pattern = g_strndup (target,