From: hackbard Date: Wed, 10 Nov 2004 12:46:48 +0000 (+0000) Subject: some bugfixes + new tests X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=3c6b696777d3ecc13534fe4054fc1ffa8c706044;p=physik%2Fnlsop.git some bugfixes + new tests --- diff --git a/nlsop_server.c b/nlsop_server.c index 747aa25..232f5cc 100644 --- a/nlsop_server.c +++ b/nlsop_server.c @@ -129,26 +129,27 @@ int save_job(t_net *net,int channel,t_job *job,unsigned char dc) { printf("receiving data from client (%d)\n",job->size); data=DATA_OK; - ret=network_receive_chan(net,channel,(unsigned char *)&d3l, + network_send_chan(net,channel,&data,sizeof(unsigned char)); + + network_receive_chan(net,channel,(unsigned char *)&d3l, sizeof(d3_lattice)); network_send_chan(net,channel,&data,sizeof(unsigned char)); printf("debug: got d3_lattice\n"); - ret=network_receive_chan(net,channel,(unsigned char *)&info,sizeof(info)); + network_receive_chan(net,channel,(unsigned char *)&info,sizeof(info)); network_send_chan(net,channel,&data,sizeof(unsigned char)); printf("debug: got info\n"); - ret=network_receive_chan(net,channel,job->ac,job->size*sizeof(unsigned char)); + network_receive_chan(net,channel,job->ac,job->size*sizeof(unsigned char)); network_send_chan(net,channel,&data,sizeof(unsigned char)); printf("debug: got ac\n"); - ret=network_receive_chan(net,channel,(unsigned char *)job->cc, + network_receive_chan(net,channel,(unsigned char *)job->cc, job->size*sizeof(int)); network_send_chan(net,channel,&data,sizeof(unsigned char)); printf("debug: got cc\n"); - ret=network_receive_chan(net,channel,(unsigned char *)&(job->step), - sizeof(int)); + network_receive_chan(net,channel,(unsigned char *)&(job->step),sizeof(int)); network_send_chan(net,channel,&data,sizeof(unsigned char)); printf("debug: got steps\n"); @@ -281,7 +282,10 @@ int handle_node(t_net *net,t_event *event, if(data==DC_END) { save_job(net,i,j,DC_END); /* reset client */ + printf("client in state %c now\n",c->status&IDLE?'i':'a'); c->status=IDLE; + printf("now: %c\n",c->status&IDLE?'i':'a'); + printf("it is channel %d\n",c->channel); /* free job memory */ free(j->ac); free(j->cc);