Changed from random_rand() to rand() function for (pseudo) random numbers because random_rand() does not work that well
This commit is contained in:
parent
91e8487032
commit
752291f450
3 changed files with 9 additions and 9 deletions
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: polite.c,v 1.5 2008/07/07 23:27:05 adamdunkels Exp $
|
||||
* $Id: polite.c,v 1.6 2009/02/07 16:16:31 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@
|
|||
|
||||
#include "net/rime.h"
|
||||
#include "net/rime/polite.h"
|
||||
#include "lib/random.h"
|
||||
#include "lib/rand.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
@ -128,7 +128,7 @@ polite_send(struct polite_conn *c, clock_time_t interval, uint8_t hdrsize)
|
|||
c->hdrsize = hdrsize;
|
||||
c->q = queuebuf_new_from_rimebuf();
|
||||
if(c->q != NULL) {
|
||||
ctimer_set(&c->t, interval / 2 + (random_rand() % (interval / 2)), send, c);
|
||||
ctimer_set(&c->t, interval / 2 + (rand() % (interval / 2)), send, c);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue