mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-21 19:29:18 +00:00
Made use of PROCESS_PAUSE().
This commit is contained in:
parent
edff8c1da3
commit
a54c728b04
@ -29,7 +29,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki desktop environment
|
* This file is part of the Contiki desktop environment
|
||||||
*
|
*
|
||||||
* $Id: wget.c,v 1.3 2010/05/31 15:22:08 nifi Exp $
|
* $Id: wget.c,v 1.4 2010/10/31 22:43:06 oliverschmidt Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -153,27 +153,27 @@ PROCESS_THREAD(wget_process, ev, data)
|
|||||||
|
|
||||||
PROCESS_BEGIN();
|
PROCESS_BEGIN();
|
||||||
|
|
||||||
process_post(PROCESS_CURRENT(), 0, NULL);
|
PROCESS_PAUSE();
|
||||||
|
|
||||||
|
fputs("\nGet url:", stdout);
|
||||||
|
gets(url);
|
||||||
|
fputs("\nSave as:", stdout);
|
||||||
|
gets(name);
|
||||||
|
puts("");
|
||||||
|
file = cfs_open(name, CFS_WRITE);
|
||||||
|
if(file == -1) {
|
||||||
|
printf("Open error with '%s'\n", name);
|
||||||
|
app_quit();
|
||||||
|
} else {
|
||||||
|
petsciiconv_toascii(url, sizeof(url));
|
||||||
|
start_get();
|
||||||
|
}
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
|
|
||||||
PROCESS_WAIT_EVENT();
|
PROCESS_WAIT_EVENT();
|
||||||
|
|
||||||
if(ev == 0) {
|
if(ev == tcpip_event) {
|
||||||
fputs("\nGet url:", stdout);
|
|
||||||
gets(url);
|
|
||||||
fputs("\nSave as:", stdout);
|
|
||||||
gets(name);
|
|
||||||
puts("");
|
|
||||||
file = cfs_open(name, CFS_WRITE);
|
|
||||||
if(file == -1) {
|
|
||||||
printf("Open error with '%s'\n", name);
|
|
||||||
app_quit();
|
|
||||||
} else {
|
|
||||||
petsciiconv_toascii(url, sizeof(url));
|
|
||||||
start_get();
|
|
||||||
}
|
|
||||||
} else if(ev == tcpip_event) {
|
|
||||||
webclient_appcall(data);
|
webclient_appcall(data);
|
||||||
#if UIP_UDP
|
#if UIP_UDP
|
||||||
} else if(ev == resolv_event_found) {
|
} else if(ev == resolv_event_found) {
|
||||||
|
Loading…
Reference in New Issue
Block a user