Revision 4123e0f7 ed.c

View differences:

ed.c
14 14
FILE *statusfile;
15 15
extern float convergence_precision;
16 16
extern uint32_t analysis_window;
17
extern int per_link_events;
17 18

  
18 19
struct ed_simulator {
19 20
	struct chunk * chunks;
......
151 152

  
152 153
void ed_simulator_gen_events(struct ed_simulator *eds)
153 154
{
154
	int i;
155
	int i, j;
155 156

  
156 157
	if(eds)
157 158
	{
158 159
		ed_simulator_schedule(eds, source_event_new(eds), 0);
159 160
		for (i = 0; i < eds->num_peers; i++) 
160
		{
161
			ed_simulator_schedule(eds, peer_offer_event_new(eds, &(eds->peers[i])), 0 );
162
		}
161
			if (per_link_events)
162
				for (j = 0; j < eds->peers[i].neigh_size; j++) 
163
					ed_simulator_schedule(eds, link_offer_event_new(eds, &(eds->peers[i]), j), 0 );
164
			else
165
				ed_simulator_schedule(eds, peer_offer_event_new(eds, &(eds->peers[i])), 0 );
163 166
	}
164 167
}
165 168

  

Also available in: Unified diff