]> hackdaworld.org Git - physik/nlsop.git/commitdiff
added gui functionality (show client info)
authorhackbard <hackbard>
Tue, 16 Nov 2004 11:35:39 +0000 (11:35 +0000)
committerhackbard <hackbard>
Tue, 16 Nov 2004 11:35:39 +0000 (11:35 +0000)
nlsop_server.c

index 5a627db66a5aef274d34a71e555509fd0de995ca..44091085e10a967e07b5b99ad9bc12ede34b4b66 100644 (file)
@@ -228,19 +228,26 @@ int send_status(void) {
 
   data=GUI_INFO;
 
-  count=list_count(&(priv.job));
-
-  printf("sending job info\n");
-
   network_send_chan(&(priv.net),gi,&data,sizeof(unsigned char));
-  network_send_chan(&(priv.net),gi,(unsigned char *)&count,sizeof(int));
+  printf("sending job + client list ...\n");
 
+  count=list_count(&(priv.job));
+  network_send_chan(&(priv.net),gi,(unsigned char *)&count,sizeof(int));
   list_reset(&(priv.job));
   for(i=0;i<count;i++) {
     network_send_chan(&(priv.net),gi,priv.job.current->data,sizeof(t_job));
     list_next(&(priv.job));
   }
 
+  count=list_count(&(priv.client));
+  network_send_chan(&(priv.net),gi,(unsigned char *)&count,sizeof(int));
+  list_reset(&(priv.client));
+  for(i=0;i<count;i++) {
+    network_send_chan(&(priv.net),gi,priv.client.current->data,
+                      sizeof(t_client));
+    list_next(&(priv.client));
+  }
+
   return 1;
 }