Fixed compilation problems, added new commands to shell.h

This commit is contained in:
adamdunkels 2009-03-06 07:23:08 +00:00
parent ddafef15e9
commit 2289ced2bb
3 changed files with 10 additions and 11 deletions

View File

@ -30,7 +30,7 @@
* *
* Author: Adam Dunkels <adam@sics.se> * Author: Adam Dunkels <adam@sics.se>
* *
* $Id: shell-tcpsend.c,v 1.1 2009/03/06 00:29:33 adamdunkels Exp $ * $Id: shell-tcpsend.c,v 1.2 2009/03/06 07:23:08 adamdunkels Exp $
*/ */
#include <string.h> #include <string.h>
@ -82,7 +82,7 @@ telnet_text_output(struct telnet_state *s, char *text1, char *text2)
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
void void
telnet_newdata(struct telnet_state *s, char *data, uint16_t len) telnet_newdata(struct telnet_state *s, char *data, u16_t len)
{ {
shell_output(&tcpsend_command, data, len, "", 0); shell_output(&tcpsend_command, data, len, "", 0);
} }

View File

@ -30,7 +30,7 @@
* *
* Author: Adam Dunkels <adam@sics.se> * Author: Adam Dunkels <adam@sics.se>
* *
* $Id: shell-udpsend.c,v 1.1 2009/03/06 00:29:33 adamdunkels Exp $ * $Id: shell-udpsend.c,v 1.2 2009/03/06 07:23:08 adamdunkels Exp $
*/ */
#include <string.h> #include <string.h>
@ -57,9 +57,6 @@ static char server[MAX_SERVERLEN + 1];
static unsigned char running; static unsigned char running;
#define MAX_LINELEN 80
static char line[MAX_LINELEN];
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static void static void
send_line(char *line, int len) send_line(char *line, int len)
@ -75,7 +72,7 @@ newdata(char *data, uint16_t len)
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
PROCESS_THREAD(shell_udpsend_process, ev, data) PROCESS_THREAD(shell_udpsend_process, ev, data)
{ {
char *next, *nextptr; const char *next, *nextptr;
struct shell_input *input; struct shell_input *input;
uint16_t port, local_port; uint16_t port, local_port;
@ -87,7 +84,6 @@ PROCESS_THREAD(shell_udpsend_process, ev, data)
"udpsend <server> <port> [localport]: server as address", ""); "udpsend <server> <port> [localport]: server as address", "");
PROCESS_EXIT(); PROCESS_EXIT();
} }
*next = 0;
++next; ++next;
strncpy(server, data, sizeof(server)); strncpy(server, data, sizeof(server));
port = shell_strtolong(next, &nextptr); port = shell_strtolong(next, &nextptr);

View File

@ -48,7 +48,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* $Id: shell.h,v 1.14 2009/03/05 21:12:03 adamdunkels Exp $ * $Id: shell.h,v 1.15 2009/03/06 07:23:08 adamdunkels Exp $
*/ */
/** /**
@ -355,13 +355,14 @@ struct shell_input {
#include "shell-blink.h" #include "shell-blink.h"
#include "shell-coffee.h"
#include "shell-checkpoint.h" #include "shell-checkpoint.h"
#include "shell-coffee.h"
#include "shell-exec.h" #include "shell-exec.h"
#include "shell-file.h" #include "shell-file.h"
#include "shell-httpd.h" #include "shell-httpd.h"
#include "shell-netfile.h"
#include "shell-irc.h" #include "shell-irc.h"
#include "shell-netfile.h"
#include "shell-ping.h"
#include "shell-power.h" #include "shell-power.h"
#include "shell-ps.h" #include "shell-ps.h"
#include "shell-reboot.h" #include "shell-reboot.h"
@ -374,8 +375,10 @@ struct shell_input {
#include "shell-run.h" #include "shell-run.h"
#include "shell-sendtest.h" #include "shell-sendtest.h"
#include "shell-sky.h" #include "shell-sky.h"
#include "shell-tcpsend.h"
#include "shell-text.h" #include "shell-text.h"
#include "shell-time.h" #include "shell-time.h"
#include "shell-udpsend.h"
#include "shell-vars.h" #include "shell-vars.h"
#include "shell-wget.h" #include "shell-wget.h"