]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - client.c
Merge /fml/ag-raetsch/home/maan/scm/paraslash_meins/paraslash/
[paraslash.git] / client.c
index be76a491b3e1db0ce15efd194611cde12f719ccf..12812c9f79ecd0a4b5b88707c88572f709ea3fdd 100644 (file)
--- a/client.c
+++ b/client.c
@@ -74,17 +74,13 @@ int main(int argc, char *argv[])
 
        s.default_timeout.tv_sec = 1;
        s.default_timeout.tv_usec = 0;
-       ret = client_parse_config(argc, argv, &pcd);
-       if (ret < 0)
-               goto out;
+       ret = client_open(argc, argv, &pcd);
+       if (ret < 0) /* can not use PARA_LOG here */
+               exit(EXIT_FAILURE);
        pcd->task.event_handler = client_event_handler;
-       ret = client_open(pcd);
-       if (ret < 0)
-               goto out;
        ret = sched(&s);
-       client_close(pcd);
-out:
        if (ret < 0)
                PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret));
+       client_close(pcd);
        return ret >= 0? EXIT_SUCCESS: EXIT_FAILURE;
 }