Revision 507372bb tests/nvtest2/nvtest2.c

View differences:

tests/nvtest2/nvtest2.c
182 182
Peer *peer_init(const char *configfile) {
183 183
	peer = calloc(sizeof(Peer), 1);
184 184

  
185
	// Init grapes: log facility and libevent
186
	grapesInit(event_base_new());
187
	info("GRAPES initialized.");
185
	// Init napa: log facility and libevent
186
	napaInit(event_base_new());
187
	info("NAPA initialized.");
188 188

  
189 189
	// Parse config file */
190 190
	cfg_t *main_config = cfg_init(cfg_main, CFGF_NONE);
......
209 209

  
210 210
	// Initialize connection opener loop for requested connections
211 211
	struct timeval begin = { 10, 0 };
212
	grapesSchedulePeriodic(&begin, 1.0/(double)peer->nblist_update_period, check_conn_reqs, NULL);
212
	napaSchedulePeriodic(&begin, 1.0/(double)peer->nblist_update_period, check_conn_reqs, NULL);
213 213

  
214 214
	// Initialize stream source and destination
215 215
	if (!dummymode) {
......
228 228
	verbosity = cfg_getint(mon_config, "level");
229 229

  
230 230
	// Initialize logging
231
	grapesInitLog(verbosity, NULL, NULL);
231
	napaInitLog(verbosity, NULL, NULL);
232 232
	info("Logging initialized with verbosity: %d", verbosity);
233 233

  
234 234
	// Init monitoring layer
......
252 252
	peer->neighborlist = neighborlist_init(peer->repository, peer->nblist_desired_size, peer->nblist_update_period, peer->channel, NULL, NULL);
253 253

  
254 254
	struct timeval begin = { 5, 0 };
255
	grapesSchedulePeriodic(&begin, 1.0/(double)peer->nblist_update_period, periodic_nblst_query, peer->neighborlist);
255
	napaSchedulePeriodic(&begin, 1.0/(double)peer->nblist_update_period, periodic_nblst_query, peer->neighborlist);
256 256
}
257 257

  
258 258
// Initialize messaging layer
......
283 283
		receive_local_socketID_cb, (void*)eventbase);
284 284

  
285 285
	while (!messaging_ready) {
286
		grapesYield();
286
		napaYield();
287 287
	}
288 288
	info("ML has been initialized, with local addess: %s", peer->LocalID);
289 289
}
......
673 673
	src->chunk_duration = chunk_duration;
674 674
	src->chunkid = 0;
675 675

  
676
	grapesSchedulePeriodic(NULL, 1.0/chunk_duration, read_stream, src);
676
	napaSchedulePeriodic(NULL, 1.0/chunk_duration, read_stream, src);
677 677
}
678 678

  
679 679
// Get the list of requested connections' list from the repository
......
743 743
		dummymode = 1;
744 744
	}
745 745

  
746
	// Initialize the GRAPES infrastructure
746
	// Initialize the NAPA infrastructure
747 747
	peer = peer_init(argv[1]);
748 748

  
749 749
	// Start everything

Also available in: Unified diff