Hi,

On 01/12/2012 09:58 AM, Christophe Fergeau wrote:

<snip>

          break;
+    case PROP_AUTO_CONNECT_FILTER: {
+#ifdef USE_USBREDIR
+        const gchar *filter = g_value_get_string(value);
+        struct usbredirfilter_rule *rules;
+        int r, count;
+
+        r = usbredirfilter_string_to_rules(filter, ",", "|",&rules,&count);
+        if (r) {
+            if (r == -ENOMEM)
+                g_error("Failed to allocate memory for auto-connect-filter");
+            g_warning("Error parsing auto-connect-filter string, keeping old 
filter\n");
+            break;
+        }
+
+        g_free(priv->auto_connect_filter);
+        free(priv->auto_conn_filter_rules);
+
+        priv->auto_connect_filter = g_strdup(filter);
+        priv->auto_conn_filter_rules = rules;
+        priv->auto_conn_filter_rules_count = count;
+#else
+        priv->auto_connect_filter = g_value_get_string(value);

I'd dup this string, it will probably go away after the property setting is
over.

Good one, new version coming up.

Regards,

Hans
_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to