Revision ffceaf6f net_helper-ml.c

View differences:

net_helper-ml.c
431 431
int wait4data(const struct nodeID *n, struct timeval *tout) {
432 432

  
433 433
//	fprintf(stderr,"Net-helper : Waiting for data to come...\n");
434
	event_base_once(base,-1, EV_TIMEOUT, &t_out_cb, NULL, tout);
434
	if (tout) {	//if tout==NULL, loop wait infinitely
435
		event_base_once(base,-1, EV_TIMEOUT, &t_out_cb, NULL, tout);
436
	}
435 437
	while(receivedBuffer[rIdx].data==NULL && timeoutFired==0) {
436 438
	//	event_base_dispatch(base);
437 439
		event_base_loop(base,EVLOOP_ONCE);

Also available in: Unified diff