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;
case GUI_QUIT:
/* stop everything */
event_math(0,event,READ,REMOVE);
+ send_quit(net);
network_shutdown(net);
input_shutdown(input);
display_shutdown(display);
t_net *gnet;
t_event *gevent;
t_list *gc_list;
+t_list *gg_list;
int alert;
/*
printf("connection to client (ch %d) fucked up!\n",*gi);
event_math(gnet->connection[*gi].fd,gevent,READ,REMOVE);
network_close(gnet,*gi);
- list_del_current(gc_list);
+ if(list_search_data(gc_list,gi,sizeof(int))==L_SUCCESS) {
+ list_del_current(gc_list);
+ printf("removed client from list\n");
+ }
+ if(list_search_data(gg_list,gi,sizeof(int))==L_SUCCESS) {
+ list_del_current(gg_list);
+ printf("removed gui from list\n");
+ }
alert=1;
alarm(0);
gnet=&net;
gevent=&event;
gc_list=&c_list;
+ gg_list=&g_list;
/* tzzz ... */
allyouneed=(void *)addr;