Send one extra byte to ensure that the terminating zero is included

This commit is contained in:
adamdunkels 2008-07-03 09:51:21 +00:00
parent 0000a091cc
commit 09f5b6d2f5

View file

@ -28,7 +28,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* $Id: shell-rime-netcmd.c,v 1.1 2008/02/05 20:35:21 adamdunkels Exp $ * $Id: shell-rime-netcmd.c,v 1.2 2008/07/03 09:51:21 adamdunkels Exp $
*/ */
/** /**
@ -53,8 +53,6 @@
#include "net/rime/timesynch.h" #include "net/rime/timesynch.h"
#define WITH_DEBUG_COMMANDS 0
#if NETSIM #if NETSIM
#include "ether.h" #include "ether.h"
#endif /* NETSIM */ #endif /* NETSIM */
@ -118,7 +116,7 @@ PROCESS_THREAD(shell_netcmd_process, ev, data)
rimebuf_clear(); rimebuf_clear();
msg = rimebuf_dataptr(); msg = rimebuf_dataptr();
rimebuf_set_datalen(len + 1); rimebuf_set_datalen(len + 2);
strcpy(msg->netcmd, data); strcpy(msg->netcmd, data);
/* printf("netcmd sending '%s'\n", msg->netcmd);*/ /* printf("netcmd sending '%s'\n", msg->netcmd);*/
trickle_send(&trickle); trickle_send(&trickle);