Revision 6920fdab

View differences:

loop-mt.c
127 127
  period = csize;
128 128
  s = s1;
129 129
 
130
  stream_init(8);	// FIXME!
130
  stream_init(8, s);	// FIXME!
131 131
  pthread_mutex_init(&cb_mutex, NULL);
132 132
  pthread_mutex_init(&topology_mutex, NULL);
133 133
  pthread_create(&receive_thread, NULL, receive, NULL); 
......
147 147
  chunks_per_period = chunks;
148 148
  s = s1;
149 149
 
150
  stream_init(1);	// FIXME!
150
  stream_init(1, s);
151 151
  pthread_mutex_init(&cb_mutex, NULL);
152 152
  pthread_mutex_init(&topology_mutex, NULL);
153 153
  pthread_create(&receive_thread, NULL, source_receive, NULL); 
loop.c
58 58
  period.tv_usec = csize % 1000000;
59 59
  
60 60
  topParseData(NULL, 0);
61
  stream_init(8);	// FIXME!
61
  stream_init(8, s);
62 62
  while (!done) {
63 63
    int len;
64 64
    int fd;
......
104 104
  period.tv_sec = csize  / 1000000;
105 105
  period.tv_usec = csize % 1000000;
106 106
  
107
  stream_init(1);
107
  stream_init(1, s);
108 108
  while (!done) {
109 109
    int len;
110 110
    int fd;
streaming.c
15 15

  
16 16
static struct chunk_buffer *cb;
17 17

  
18
void stream_init(int size)
18
void stream_init(int size, struct nodeID *myID)
19 19
{
20 20
  char conf[32];
21 21

  
22 22
  sprintf(conf, "size=%d", size);
23 23
  cb = cb_init(conf);
24
  chunkInit(myID);
24 25
}
25 26

  
26 27
void received_chunk(const uint8_t *buff, int len)
streaming.h
1
void stream_init(int size);
1
void stream_init(int size, struct nodeID *myID);
2 2
void received_chunk(const uint8_t *buff, int len);
3 3
void send_chunk(const struct nodeID **neighbours, int n);
4 4
void generated_chunk(void);

Also available in: Unified diff