Fixed incomplete integration of shell server log gui.

This commit is contained in:
oliverschmidt 2007-04-13 22:15:52 +00:00
parent 079a4a1b54
commit 94bd0de72d
2 changed files with 9 additions and 6 deletions

View file

@ -28,7 +28,7 @@
* *
* This file is part of the Contiki desktop OS. * This file is part of the Contiki desktop OS.
* *
* $Id: telnetd.c,v 1.3 2007/04/13 22:02:28 oliverschmidt Exp $ * $Id: telnetd.c,v 1.4 2007/04/13 22:15:52 oliverschmidt Exp $
* *
*/ */
@ -147,6 +147,9 @@ shell_output(char *str1, char *str2)
static unsigned len; static unsigned len;
char *line; char *line;
#if TELNETD_CONF_GUI
telnetd_gui_output(str1, str2);
#endif /* TELNETD_CONF_GUI */
line = alloc_line(); line = alloc_line();
if(line != NULL) { if(line != NULL) {
len = (unsigned int)strlen(str1); len = (unsigned int)strlen(str1);
@ -172,6 +175,9 @@ PROCESS_THREAD(telnetd_process, ev, data)
tcp_listen(HTONS(23)); tcp_listen(HTONS(23));
memb_init(&linemem); memb_init(&linemem);
shell_init(); shell_init();
#if TELNETD_CONF_GUI
telnetd_gui_init();
#endif /* TELNETD_CONF_GUI */
while(1) { while(1) {
PROCESS_WAIT_EVENT(); PROCESS_WAIT_EVENT();
@ -283,7 +289,6 @@ newdata(void)
u16_t len; u16_t len;
u8_t c; u8_t c;
len = uip_datalen(); len = uip_datalen();
while(len > 0 && s.bufptr < sizeof(s.buf)) { while(len > 0 && s.bufptr < sizeof(s.buf)) {
@ -344,10 +349,7 @@ newdata(void)
} }
break; break;
} }
} }
} }
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
void void

View file

@ -29,7 +29,7 @@
* *
* This file is part of the Contiki desktop environment * This file is part of the Contiki desktop environment
* *
* $Id: telnetd.h,v 1.1 2006/06/17 22:41:13 adamdunkels Exp $ * $Id: telnetd.h,v 1.2 2007/04/13 22:15:52 oliverschmidt Exp $
* *
*/ */
#ifndef __TELNETD_H__ #ifndef __TELNETD_H__
@ -42,6 +42,7 @@ PROCESS_NAME(telnetd_process);
void telnetd_gui_eventhandler(process_event_t ev, process_data_t data); void telnetd_gui_eventhandler(process_event_t ev, process_data_t data);
void telnetd_appcall(void *data); void telnetd_appcall(void *data);
void telnetd_gui_init(void);
void telnetd_gui_output(char *str1, char *str2); void telnetd_gui_output(char *str1, char *str2);
void telnetd_gui_quit(void); void telnetd_gui_quit(void);
void telnetd_quit(void); void telnetd_quit(void);