diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2008-11-30 23:54:36 +0100 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2008-11-30 23:54:36 +0100 |
commit | cfa6dcd217c94234ebafff65079af2ca5166d178 (patch) | |
tree | af43c13764905682fba6bbbb9e8aeee98eb1144a /eurephiadm/eurephiadm.c | |
parent | 02ea6fd2a97ca6c662e72ba189252aff9ca67331 (diff) | |
download | eurephia-cfa6dcd217c94234ebafff65079af2ca5166d178.tar.gz eurephia-cfa6dcd217c94234ebafff65079af2ca5166d178.tar.xz eurephia-cfa6dcd217c94234ebafff65079af2ca5166d178.zip |
Changed the exit procedure when auto-logged out, to shutdown properly
Diffstat (limited to 'eurephiadm/eurephiadm.c')
-rw-r--r-- | eurephiadm/eurephiadm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/eurephiadm/eurephiadm.c b/eurephiadm/eurephiadm.c index fda9be8..a47311a 100644 --- a/eurephiadm/eurephiadm.c +++ b/eurephiadm/eurephiadm.c @@ -473,7 +473,8 @@ int main(int argc, char **argv) { // No session file - go straight to login if( strcmp(argv[1], "logout") == 0) { fprintf(stderr, "You are already logged out\n"); - return 0; + rc = 0; + goto exit; } session = do_login(ctx); } else { @@ -486,7 +487,8 @@ int main(int argc, char **argv) { remove_session_file(ctx); if( strcmp(argv[1], "logout") == 0) { fprintf(stderr, "You are already logged out\n"); - return 0; + rc = 0; + goto exit; } session = do_login(ctx); } @@ -511,6 +513,7 @@ int main(int argc, char **argv) { remove_session_file(ctx); } + exit: // Disconnect from the database, and remove config and our context before exiting eFree_values(ctx, cfg); eDBdisconnect(ctx); |