From: hackbard Date: Mon, 7 Feb 2005 16:05:19 +0000 (+0000) Subject: send ack after data send, clear status and concentartion buffer at start X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=361df9fdcc3ff3f6eb5480b9dc6f34e1bcced416;p=physik%2Fnlsop.git send ack after data send, clear status and concentartion buffer at start --- diff --git a/nlsop_client.c b/nlsop_client.c index 0d52f94..8a1c81c 100644 --- a/nlsop_client.c +++ b/nlsop_client.c @@ -311,6 +311,7 @@ u32 get_reject_graph(info *my_info,d3_lattice *d3_l,char *file,u32 *graph) { void send_data(int signum) { int c; + unsigned char ack=DATA_OK; c=gd3_l->max_x*gd3_l->max_y*gd3_l->max_z; @@ -320,6 +321,7 @@ void send_data(int signum) { 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)); + network_send_chan(gnet,0,&ack,sizeof(unsigned char)); if(dc==DC_QUIT) shut_down=1; } @@ -474,6 +476,11 @@ int get_data_and_calc(t_event *event,void *allineed) { sizeof(int)); network_send(net->connection[0].fd,&data,sizeof(unsigned char)); } + if(c_step==0) { + printf("important: clear status/conc data!\n"); + memset(d3_l.status,0,j*sizeof(unsigned char)); + memset(d3_l.extra,0,j*sizeof(int)); + } } else { printf("unknown instruction, restarting ...\n");