summaryrefslogtreecommitdiffstats
path: root/eurephiadm/eurephiadm.c
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2008-11-30 23:54:36 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2008-11-30 23:54:36 +0100
commitcfa6dcd217c94234ebafff65079af2ca5166d178 (patch)
treeaf43c13764905682fba6bbbb9e8aeee98eb1144a /eurephiadm/eurephiadm.c
parent02ea6fd2a97ca6c662e72ba189252aff9ca67331 (diff)
downloadeurephia-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.c7
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);