* More uip_ipaddr_t fixes.
This commit is contained in:
parent
eb7fcb54b4
commit
a99f0ca352
3 changed files with 16 additions and 15 deletions
|
@ -30,7 +30,7 @@
|
|||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: node.c,v 1.1 2006/06/17 22:41:35 adamdunkels Exp $
|
||||
* $Id: node.c,v 1.2 2006/08/14 14:01:02 bg- Exp $
|
||||
*/
|
||||
#include "node.h"
|
||||
#include "contiki.h"
|
||||
|
@ -50,7 +50,7 @@ static void init_node_log(void);
|
|||
void
|
||||
node_init(int id, int posx, int posy, int b)
|
||||
{
|
||||
u16_t addr[2];
|
||||
uip_ipaddr_t addr;
|
||||
|
||||
node.id = id;
|
||||
node.x = posx;
|
||||
|
@ -58,11 +58,11 @@ node_init(int id, int posx, int posy, int b)
|
|||
node.type = NODE_TYPE_NORMAL;
|
||||
|
||||
if(b) {
|
||||
uip_ipaddr(addr, 192,168,250,2);
|
||||
uip_ipaddr(&addr, 192,168,250,2);
|
||||
} else {
|
||||
uip_ipaddr(addr, 10,10,posx,posy);
|
||||
uip_ipaddr(&addr, 10,10,posx,posy);
|
||||
}
|
||||
uip_sethostaddr(addr);
|
||||
uip_sethostaddr(&addr);
|
||||
|
||||
drift = random() % 9572627217;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue