Revision 93202b19 src/PeerSampler/cloudcast.c

View differences:

src/PeerSampler/cloudcast.c
27 27
#include "grapes_msg_types.h"
28 28

  
29 29
#define DEFAULT_CACHE_SIZE 10
30
#define DEFAULT_CLOUD_CONTACT_TRESHOLD 4000000
30

  
31
#define CLOUDCAST_TRESHOLD 4
32
#define CLOUDCAST_PERIOD 10000000 // 10 seconds
33
#define CLOUDCAST_BOOTSTRAP_PERIOD 2000000 // 2 seconds
31 34

  
32 35
struct peersampler_context{
33 36
  uint64_t currtime;
......
71 74

  
72 75
  //Initialize context with default values
73 76
  con->bootstrap = true;
74
  con->bootstrap_period = 2000000;
75
  con->period = 10000000;
77
  con->bootstrap_period = CLOUDCAST_BOOTSTRAP_PERIOD;
78
  con->period = CLOUDCAST_PERIOD;
76 79
  con->currtime = gettime();
80
  con->cloud_contact_treshold = CLOUDCAST_TRESHOLD;
81

  
77 82
  con->r = NULL;
78
  con->cloud_contact_treshold = DEFAULT_CLOUD_CONTACT_TRESHOLD;
79 83

  
80 84
  return con;
81 85
}

Also available in: Unified diff