projects
/
physik
/
nlsop.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some more printfs to server + deleted debug printf in gui
[physik/nlsop.git]
/
nlsop_gui.c
diff --git
a/nlsop_gui.c
b/nlsop_gui.c
index
8464faf
..
94e9fd8
100644
(file)
--- a/
nlsop_gui.c
+++ b/
nlsop_gui.c
@@
-249,6
+249,17
@@
int nothing(t_event *event,void *allineed) {
return 1;
}
return 1;
}
+int send_quit(t_net *net) {
+
+ unsigned char data;
+
+ data=GUI_QUIT;
+
+ network_send_chan(net,0,&data,1);
+
+ return 1;
+}
+
int get_command(t_event *event,void *allineed) {
t_net *net;
int get_command(t_event *event,void *allineed) {
t_net *net;
@@
-275,6
+286,7
@@
int get_command(t_event *event,void *allineed) {
case GUI_QUIT:
/* stop everything */
event_math(0,event,READ,REMOVE);
case GUI_QUIT:
/* stop everything */
event_math(0,event,READ,REMOVE);
+ send_quit(net);
network_shutdown(net);
input_shutdown(input);
display_shutdown(display);
network_shutdown(net);
input_shutdown(input);
display_shutdown(display);
@@
-393,8
+405,6
@@
int main(int argc,char **argv)
/* wait for job */
event_start(&event,allyouneed,get_command,nothing);
/* wait for job */
event_start(&event,allyouneed,get_command,nothing);
- dprintf(fd,"hu?\n");
-
close(fd);
return 1;
close(fd);
return 1;