Revision 14e5c21e

View differences:

measures-monl.c
115 115
/*
116 116
 * Register chunk receive event
117 117
*/
118
void reg_chunk_receive(int id, uint64_t timestamp, int hopcount)
118
void reg_chunk_receive(int id, uint64_t timestamp, int hopcount, bool old, bool dup)
119 119
{
120 120
	struct timeval tnow;
121 121

  
measures.c
128 128
/*
129 129
 * Register chunk receive event
130 130
*/
131
void reg_chunk_receive(int id, uint64_t timestamp, int hopcount)
131
void reg_chunk_receive(int id, uint64_t timestamp, int hopcount, bool old, bool dup)
132 132
{
133 133
  struct timeval tnow;
134 134

  
measures.h
18 18
void reg_chunk_duplicate();
19 19
void reg_chunk_playout(int id, bool b, uint64_t timestamp);
20 20
void reg_neigh_size(int s);
21
void reg_chunk_receive(int id, uint64_t timestamp, int hopcount);
21
void reg_chunk_receive(int id, uint64_t timestamp, int hopcount, bool old, bool dup);
22 22
void reg_chunk_send(int id);
23 23
void reg_offer_accept(bool b);
24 24

  
streaming.c
259 259
  res = decodeChunk(&c, buff + 1, len - 1);
260 260
  if (res > 0) {
261 261
    chunk_attributes_update_received(&c);
262
    reg_chunk_receive(c.id, c.timestamp, chunk_get_hopcount(&c));
263 262
    chunk_unlock(c.id);
264 263
    dprintf("Received chunk %d from peer: %s\n", c.id, node_addr(from));
265 264
    if(chunk_log){fprintf(stderr, "TEO: Received chunk %d from peer: %s at: %lld hopcount: %i\n", c.id, node_addr(from), gettimeofday_in_us(), chunk_get_hopcount(&c));}
266 265
    output_deliver(&c);
267 266
    res = cb_add_chunk(cb, &c);
267
    reg_chunk_receive(c.id, c.timestamp, chunk_get_hopcount(&c), res==E_CB_OLD, res==E_CB_DUPLICATE);
268 268
    cb_print();
269 269
    if (res < 0) {
270 270
      dprintf("\tchunk too old, buffer full with newer chunks\n");

Also available in: Unified diff