Converted scope-local variables into function-local variables.

The 6502-specific LC implementation doesn't allow for scope-local vaiables between PT_BEGIN/PROCESS_BEGIN/PSOCK_BEGIN and PT_BEGIN/PROCESS_END/PSOCK_END.
This commit is contained in:
Oliver Schmidt 2011-04-12 14:12:09 +02:00
parent b19fb0ac9e
commit 07f3df45be
11 changed files with 50 additions and 44 deletions

View file

@ -67,6 +67,7 @@ PROCESS(shell_rsh_server_process, "rsh server");
PROCESS_THREAD(shell_rsh_process, ev, data)
{
static rimeaddr_t receiver;
struct shell_input *input;
const char *nextptr;
char buf[40];
@ -88,7 +89,6 @@ PROCESS_THREAD(shell_rsh_process, ev, data)
meshconn_connect(&meshconn, &receiver);
while(1) {
struct shell_input *input;
PROCESS_WAIT_EVENT();
if(ev == shell_event_input) {
input = data;
@ -114,6 +114,8 @@ PROCESS_THREAD(shell_rsh_process, ev, data)
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(shell_rsh_server_process, ev, data)
{
struct shell_input *input;
PROCESS_BEGIN();
while(1) {
@ -123,7 +125,6 @@ PROCESS_THREAD(shell_rsh_server_process, ev, data)
if(ev == PROCESS_EVENT_EXITED) {
front_process = NULL;
} else if(ev == shell_event_input) {
struct shell_input *input;
input = data;
packetbuf_clear();
memcpy(packetbuf_dataptr(), input->data1, input->len1);