Fix a few bugs
authorMichael J. Pounders <snowblind@bellsouth.net>
Wed, 26 Nov 2014 00:33:48 +0000 (19:33 -0500)
committerMichael J. Pounders <snowblind@bellsouth.net>
Wed, 26 Nov 2014 00:33:48 +0000 (19:33 -0500)
shm_utils/mon-umurmurd/CHANGES
shm_utils/mon-umurmurd/Makefile
shm_utils/mon-umurmurd/mon-umurmurd.c
src/sharedmemory.c

index 93ead4acdcd56e980c5427ababfb49d7d45b4f69..9b4f7686c6a310b717b134251628f84c624f5d81 100644 (file)
@@ -1,3 +1,9 @@
+* BUG_FIX: Fix the screen not clearing when last person exits the server \r
+\r
+\r
+* Code clean up\r
+\r
+\r
 * Added more client data 99% of the useful client data shown\r
 * rework Sharedmemory_update() to not use memcpy (requested by fatbob)\r
 \r
@@ -5,10 +11,9 @@
 * Using a more modern unix sharedmemory API. this requires linking with librt.so  (requested by fatbob)\r
 * Added away to know if umurmurd is not connected/updateing the shm_t struct. I use 8bit timer with \r
   rollover protection see check_serverTick() and where I use the function near bottum of mon-umurmurd.c \r
-       for     how     to use this.\r
+  for how to use this.\r
 \r
 \r
 * code clean up and some comments added\r
 * ~95% of the useful client data shown\r
 * outputs a more meaningful idle and online time, both are reported in secs (error reported by fatbob)\r
-    
\ No newline at end of file
index 9ecd325c59eeb40d7a2ec9617228d9f237bbbcca..e10e898b2cdcfe15089f3cd8ed2c4d2c433daffc 100644 (file)
@@ -20,6 +20,6 @@ clean:
        rm -rf $(PROGRAMS)
 
 install: all
-
+       cp mon-umurmurd /usr/local/bin/
 
 .PHONY: install
index 29445995f0c8546614ebdb03638afb3bbff1a2dc..18a8a97b5e8de923e259e364107bf3405bd725b3 100644 (file)
@@ -93,7 +93,7 @@ void run_shm(void)
 \r
 int cc;\r
 \r
-    printf( "\033[2J\033[H" ); //clear screen VT100\r
+    printf( "\033[2J\033[H" ); fflush(stdout); //clear screen VT100\r
           \r
           \r
         for( cc = 0 ; cc < shmptr->server_max_clients ; cc++ )\r
@@ -150,4 +150,4 @@ int cc;
         {\r
             exit(EXIT_FAILURE); //You dont have to exit you could just report the fact that the data is not valid \r
         }\r
-}
\ No newline at end of file
+}\r
index 0421fe059fe59b56ca515cd4ed259b9cd4c438f1..f8c420c29245b187f36bfa3e87f0bee5ae3faa17 100644 (file)
@@ -105,6 +105,6 @@ void Sharedmemory_alivetick(void)
 void Sharedmemory_deinit(void) \r
 {\r
   close( shm_fd );\r
-  unlink( shm_file_name );\r
+  shm_unlink( shm_file_name );\r
   shmptr->umurmurd_pid = 0;\r
-}
\ No newline at end of file
+}\r