Alignment bugfix

This commit is contained in:
adamdunkels 2010-01-18 21:27:21 +00:00
parent 2772d31ae6
commit c962f49516

View File

@ -33,7 +33,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: polite-announcement.c,v 1.6 2009/11/08 19:40:17 adamdunkels Exp $
* $Id: polite-announcement.c,v 1.7 2010/01/18 21:27:21 adamdunkels Exp $
*/
/**
@ -117,17 +117,18 @@ send_adv(clock_time_t interval)
static void
adv_packet_received(struct ipolite_conn *ipolite, const rimeaddr_t *from)
{
struct announcement_msg *adata = packetbuf_dataptr();
struct announcement_msg adata;
int i;
memcpy(&adata, packetbuf_dataptr(), sizeof(struct announcement_msg));
PRINTF("%d.%d: adv_packet_received from %d.%d with %d announcements\n",
rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1],
from->u8[0], from->u8[1], adata->num);
from->u8[0], from->u8[1], adata.num);
for(i = 0; i < adata->num; ++i) {
for(i = 0; i < adata.num; ++i) {
announcement_heard(from,
adata->data[i].id,
adata->data[i].value);
adata.data[i].id,
adata.data[i].value);
}
}
/*---------------------------------------------------------------------------*/