From 2ce444c1759f8cff7766f2b663e710b8306e0e29 Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Thu, 28 Feb 2008 23:50:02 +0000 Subject: [PATCH] Made use of shell_quit(). --- apps/shell/gui-shell.c | 15 +++++---------- apps/telnetd/telnetd.c | 9 ++------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/apps/shell/gui-shell.c b/apps/shell/gui-shell.c index b57a80c59..5eaaf0186 100644 --- a/apps/shell/gui-shell.c +++ b/apps/shell/gui-shell.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki desktop OS. * - * $Id: gui-shell.c,v 1.4 2008/02/10 12:24:43 oliverschmidt Exp $ + * $Id: gui-shell.c,v 1.5 2008/02/28 23:50:02 oliverschmidt Exp $ * */ @@ -66,14 +66,6 @@ PROCESS(shell_gui_process, "Command shell"); AUTOSTART_PROCESSES(&shell_gui_process); -/*-----------------------------------------------------------------------------------*/ -void -shell_quit(char *str) -{ - ctk_window_close(&window); - process_exit(&shell_gui_process); - LOADER_UNLOAD(); -} /*-----------------------------------------------------------------------------------*/ void shell_default_output(const char *str1, int len1, const char *str2, int len2) @@ -145,7 +137,10 @@ PROCESS_THREAD(shell_gui_process, ev, data) } } else if(ev == ctk_signal_window_close || ev == PROCESS_EVENT_EXIT) { - shell_quit(NULL); + shell_quit(); + ctk_window_close(&window); + process_exit(&shell_gui_process); + LOADER_UNLOAD(); } } PROCESS_END(); diff --git a/apps/telnetd/telnetd.c b/apps/telnetd/telnetd.c index f3330646d..845fdef8f 100644 --- a/apps/telnetd/telnetd.c +++ b/apps/telnetd/telnetd.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki desktop OS. * - * $Id: telnetd.c,v 1.10 2008/02/24 20:43:28 adamdunkels Exp $ + * $Id: telnetd.c,v 1.11 2008/02/28 23:50:38 oliverschmidt Exp $ * */ @@ -139,14 +139,9 @@ buf_len(struct telnetd_buf *buf) } /*---------------------------------------------------------------------------*/ void -shell_quit(char *str) -{ - s.state = STATE_CLOSE; -} -/*---------------------------------------------------------------------------*/ -void telnetd_quit(void) { + shell_quit(); #if TELNETD_CONF_GUI telnetd_gui_quit(); #endif /* TELNETD_CONF_GUI */