From c0fb680f12a4c0c87fdb0c5b2783a196eafdcf18 Mon Sep 17 00:00:00 2001 From: nvt-se Date: Mon, 13 Apr 2009 19:55:15 +0000 Subject: [PATCH] simplified code by using udp_broadcast_new. --- core/net/rime/rime-udp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/net/rime/rime-udp.c b/core/net/rime/rime-udp.c index e351b2922..f75850cc9 100644 --- a/core/net/rime/rime-udp.c +++ b/core/net/rime/rime-udp.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rime-udp.c,v 1.2 2009/04/06 13:27:37 nvt-se Exp $ + * $Id: rime-udp.c,v 1.3 2009/04/13 19:55:15 nvt-se Exp $ */ /** @@ -77,12 +77,10 @@ PROCESS_THREAD(rime_udp_process, ev, data) PROCESS_BEGIN(); - uip_create_linklocal_allnodes_mcast(&ipaddr); - broadcast_conn = udp_new(&ipaddr, HTONS(RIME_UDP_PORT), NULL); + broadcast_conn = udp_broadcast_new(HTONS(RIME_UDP_PORT), NULL); if(broadcast_conn == NULL) { PRINTF("rime-udp: Failed to allocate a broadcast connection!\n"); } - udp_bind(broadcast_conn, HTONS(RIME_UDP_PORT)); uip_create_unspecified(&ipaddr); unicast_conn = udp_new(&ipaddr, HTONS(RIME_UDP_PORT), NULL);