bugfix: alignment problem caused by previous bugfix
This commit is contained in:
parent
11362d0489
commit
26e0bab11a
@ -33,7 +33,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: polite-announcement.c,v 1.7 2010/01/18 21:27:21 adamdunkels Exp $
|
||||
* $Id: polite-announcement.c,v 1.8 2010/01/21 11:39:35 fros4943 Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -120,15 +120,20 @@ adv_packet_received(struct ipolite_conn *ipolite, const rimeaddr_t *from)
|
||||
struct announcement_msg adata;
|
||||
int i;
|
||||
|
||||
/* Copy number of announcements */
|
||||
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);
|
||||
|
||||
for(i = 0; i < adata.num; ++i) {
|
||||
struct announcement_data data;
|
||||
|
||||
/* Copy announcements */
|
||||
memcpy(&data, &((struct announcement_msg *)packetbuf_dataptr())->data[i], sizeof(struct announcement_data));
|
||||
announcement_heard(from,
|
||||
adata.data[i].id,
|
||||
adata.data[i].value);
|
||||
data.id,
|
||||
data.value);
|
||||
}
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
Loading…
Reference in New Issue
Block a user