mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
Updated to latest collect-neighbor API
This commit is contained in:
parent
5eb22ad289
commit
e60afb0888
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the uIP TCP/IP stack.
|
||||
*
|
||||
* $Id: ajax-cgi.c,v 1.5 2010/01/19 11:23:13 nifi Exp $
|
||||
* $Id: ajax-cgi.c,v 1.6 2010/04/04 12:30:39 adamdunkels Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -167,7 +167,7 @@ static unsigned short
|
||||
make_neighbor(void *arg)
|
||||
{
|
||||
struct httpd_state *s = (struct httpd_state *)arg;
|
||||
struct neighbor *n = neighbor_get(s->u.count);
|
||||
struct collet_neighbor *n = collet_neighbor_get(s->u.count);
|
||||
|
||||
if(n == NULL) {
|
||||
return 0;
|
||||
@ -189,9 +189,9 @@ PT_THREAD(neighborscall(struct httpd_state *s, char *ptr))
|
||||
|
||||
/* printf("neighbor_num %d\n", neighbor_num());*/
|
||||
|
||||
for(s->u.count = 0; s->u.count < neighbor_num(); s->u.count++) {
|
||||
for(s->u.count = 0; s->u.count < collect_neighbor_num(); s->u.count++) {
|
||||
/* printf("count %d\n", s->u.count);*/
|
||||
if(neighbor_get(s->u.count) != NULL) {
|
||||
if(collect_neighbor_get(s->u.count) != NULL) {
|
||||
/* printf("!= NULL\n");*/
|
||||
PSOCK_GENERATOR_SEND(&s->sout, make_neighbor, s);
|
||||
}
|
||||
@ -205,16 +205,16 @@ static void
|
||||
received_announcement(struct announcement *a, const rimeaddr_t *from,
|
||||
uint16_t id, uint16_t value)
|
||||
{
|
||||
struct neighbor *n;
|
||||
struct collect_neighbor *n;
|
||||
|
||||
/* printf("adv_received %d.%d\n", from->u8[0], from->u8[1]);*/
|
||||
|
||||
n = neighbor_find(from);
|
||||
n = collect_neighbor_find(from);
|
||||
|
||||
if(n == NULL) {
|
||||
neighbor_add(from, value, 1);
|
||||
collect_neighbor_add(from, value, 1);
|
||||
} else {
|
||||
neighbor_update(n, value);
|
||||
collect_neighbor_update(n, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user