projects
/
physik
/
nlsop.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more printfs to client, debug printfs for server
[physik/nlsop.git]
/
nlsop_server.c
diff --git
a/nlsop_server.c
b/nlsop_server.c
index
7f24e8c
..
ea45791
100644
(file)
--- a/
nlsop_server.c
+++ b/
nlsop_server.c
@@
-112,6
+112,8
@@
int add_node(t_net *net,t_event *event,t_list *c_list,t_list *g_list) {
/* if we have a new node - care for it! */
event_math(net->connection[channel].fd,event,READ,ADD);
/* if we have a new node - care for it! */
event_math(net->connection[channel].fd,event,READ,ADD);
+ printf("\n");
+
return 1;
}
return 1;
}
@@
-205,6
+207,9
@@
int add_job(t_net *net,int chan,t_list *jl) {
job.step=0;
list_add_element(jl,&job,sizeof(t_job));
job.step=0;
list_add_element(jl,&job,sizeof(t_job));
+
+ printf("job added: b=%f | c=%f | s=%f ...\n",
+ job.info.b,job.info.c,job.info.s);
return 1;
}
return 1;
}
@@
-262,12
+267,14
@@
int handle_node(t_net *net,t_event *event,
c->status=IDLE;
/* delete job entry */
list_del_current(job);
c->status=IDLE;
/* delete job entry */
list_del_current(job);
+ printf("job ended, saved and removed from list.\n");
}
if(data==DC_OK) {
save_job(net,i,j,DC_OK);
/* inc progress state */
j->progress+=1;
}
if(data==DC_OK) {
save_job(net,i,j,DC_OK);
/* inc progress state */
j->progress+=1;
+ printf("job at next level, saved.\n");
}
if(data==DC_QUIT) {
}
if(data==DC_QUIT) {
@@
-279,6
+286,7
@@
int handle_node(t_net *net,t_event *event,
list_del_current(c_list);
/* change job state */
j->status=IN_QUEUE;
list_del_current(c_list);
/* change job state */
j->status=IN_QUEUE;
+ printf("client terminating, job queued, client removed.\n");
}
}
}
}
@@
-308,6
+316,8
@@
int handle_node(t_net *net,t_event *event,
}
}
}
}
}
}
+
+ printf("\n");
return 1;
}
return 1;
}
@@
-330,6
+340,8
@@
int distribute_jobs(t_event *event,void *allineed) {
g_list=(t_list *)addr[2];
job=(t_list *)addr[3];
g_list=(t_list *)addr[2];
job=(t_list *)addr[3];
+ printf("d: distributing jobs ...\n");
+
count_j=list_count(job);
count_c=list_count(c_list);
count_j=list_count(job);
count_c=list_count(c_list);