Move ggo files to a separate directory.
[paraslash.git] / client_common.c
index d8eaba66cc9b7d704f1479b80fab8709bc53f674..e5be430dfdb43021bfc9a01443593423cc5802b6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1997-2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1997-2009 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -328,7 +328,9 @@ int client_open(int argc, char *argv[], struct client_task **ct_ptr)
 
        *ct_ptr = ct;
        ct->fd = -1;
-       ret = client_cmdline_parser(argc, argv, &ct->conf);
+       ret = -E_CLIENT_SYNTAX;
+       if (client_cmdline_parser(argc, argv, &ct->conf))
+               goto out;
        HANDLE_VERSION_FLAG("client", ct->conf);
        ret = -E_CLIENT_SYNTAX;
        if (!ct->conf.inputs_num)
@@ -353,10 +355,13 @@ int client_open(int argc, char *argv[], struct client_task **ct_ptr)
                        .override = 0,
                        .initialize = 0,
                        .check_required = 0,
-                       .check_ambiguity = 0
+                       .check_ambiguity = 0,
+                       .print_errors = 0
                };
-               client_cmdline_parser_config_file(ct->config_file,
-                       &ct->conf, &params);
+               ret = -E_BAD_CONFIG;
+               if (client_cmdline_parser_config_file(ct->config_file,
+                       &ct->conf, &params))
+                       goto out;
        }
        ret = 1;
        PARA_INFO_LOG("loglevel: %d\n", ct->conf.loglevel_arg);
@@ -374,4 +379,3 @@ out:
        }
        return ret;
 }
-