Removed explicit shut down of network driver as it easily results in endless recursions on errors while network driver initialisation.

This commit is contained in:
oliverschmidt 2007-05-23 22:01:14 +00:00
parent e9e925bc6a
commit a300c31d7e
3 changed files with 3 additions and 34 deletions

View file

@ -29,12 +29,11 @@
*
* This file is part of the Contiki desktop environment
*
* $Id: contiki-main.c,v 1.6 2007/05/22 21:27:55 oliverschmidt Exp $
* $Id: contiki-main.c,v 1.7 2007/05/23 22:03:41 oliverschmidt Exp $
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <gdk/gdktypes.h>
#include <gtk/gtk.h>
@ -124,12 +123,6 @@ idle_callback(gpointer data)
return TRUE;
}
/*-----------------------------------------------------------------------------------*/
void
exit_handler(void)
{
process_post_synch(&tapdev_process, PROCESS_EVENT_EXIT, NULL);
}
/*-----------------------------------------------------------------------------------*/
int
main(int argc, char **argv)
{
@ -166,8 +159,6 @@ main(int argc, char **argv)
uip_fw_default(&tapif);
atexit(exit_handler);
gtk_timeout_add(20, idle_callback, NULL);
gtk_main();

View file

@ -29,12 +29,11 @@
*
* This file is part of the Contiki OS
*
* $Id: contiki-main.c,v 1.7 2007/05/22 21:19:34 oliverschmidt Exp $
* $Id: contiki-main.c,v 1.8 2007/05/23 22:02:26 oliverschmidt Exp $
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "contiki.h"
@ -52,16 +51,6 @@ PROCINIT(&etimer_process, &tcpip_process, &wpcap_process);
PROCINIT(&etimer_process, &tcpip_process, &tapdev_process);
#endif
/*-----------------------------------------------------------------------------------*/
void
exit_handler(void)
{
#ifdef __CYGWIN__
process_post_synch(&wpcap_process, PROCESS_EVENT_EXIT, NULL);
#else
process_post_synch(&tapdev_process, PROCESS_EVENT_EXIT, NULL);
#endif
}
/*---------------------------------------------------------------------------*/
int
main(void)
@ -83,8 +72,6 @@ main(void)
uip_ipaddr(&addr, 255,255,255,0);
uip_setnetmask(&addr);
atexit(exit_handler);
while(1) {
int n;
n = process_run();

View file

@ -30,13 +30,12 @@
*
* Author: Oliver Schmidt <ol.sc@web.de>
*
* $Id: contiki-main.c,v 1.11 2007/05/20 21:43:21 oliverschmidt Exp $
* $Id: contiki-main.c,v 1.12 2007/05/23 22:01:14 oliverschmidt Exp $
*/
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include "contiki-net.h"
@ -84,12 +83,6 @@ log_message(const char *part1, const char *part2)
debug_printf("%s%s\n", part1, part2);
}
/*-----------------------------------------------------------------------------------*/
void
exit_handler(void)
{
process_post_synch(&wpcap_process, PROCESS_EVENT_EXIT, NULL);
}
/*-----------------------------------------------------------------------------------*/
int
main(void)
{
@ -100,8 +93,6 @@ main(void)
program_handler_add(&directory_dsc, "Directory", 1);
program_handler_add(&www_dsc, "Web browser", 1);
atexit(exit_handler);
#if 1
{
uip_ipaddr_t addr;