client: Accept correctly spelled option name
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 24 May 2013 11:58:07 +0000 (14:58 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 24 May 2013 13:05:14 +0000 (16:05 +0300)
Accept also correctly spelled version of 'preferred' option.

client/commands.c

index bd33284..1a87c53 100644 (file)
@@ -738,10 +738,12 @@ static void config_append_ipv6(DBusMessageIter *iter, void *user_data)
                        if (opts[1] != NULL) {
                                append->values = 2;
 
-                               if (g_strcmp0(opts[1], "prefered") != 0) {
+                               if (g_strcmp0(opts[1], "prefered") != 0 &&
+                                               g_strcmp0(opts[1],
+                                                       "preferred") != 0) {
                                        fprintf(stderr, "Error %s: %s\n",
                                                        opts[1],
-                                                       strerror(-EINVAL));
+                                                       strerror(EINVAL));
                                        return;
                                }