info *gmy_info;
int *gi;
unsigned char dc;
+unsigned char shut_down;
int get_data_and_calc(t_event *event,void *allineed);
int nop(t_event *event,void *allineed);
network_send_chan(gnet,0,gd3_l->status,c*sizeof(unsigned char));
network_send_chan(gnet,0,(unsigned char *)gd3_l->extra,c*sizeof(int));
network_send_chan(gnet,0,(unsigned char *)gi,sizeof(int));
+
+ if(dc==DC_QUIT) shut_down=1;
}
printf("idle, waiting for jobs ...\n");
event_start(&event,NULL,get_data_and_calc,nop);
+ network_shutdown(&net);
+
return 1;
}
gmy_info=&my_info;
gi=&i;
dc=0;
+ shut_down=0;
printf("got a new job ...\n");
dc=DC_QUIT;
}
if(i%my_info.s_rate==0) sputter(&d3_l);
+ if(shut_down) {
+ free(d3_l.status);
+ free(d3_l.extra);
+ free(c_profile);
+ free(n_e_loss);
+ free(nel_z);
+ event_stop(event);
+ }
}
/* finished */