From: Anders R. <ma...@us...> - 2006-01-27 18:18:06
|
Update of /cvsroot/planeshift/planeshift/src/tools/wordnet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30908/src/tools/wordnet Modified Files: wn.h wnutil.c Log Message: - Changed unused Run function in clientmsghandler into a virtual abstract. - Removed passing of msghandler through constructors and init functions, the msghandler is accessable through the global pointer and function call psengine->GetEventManager(). This included removing of storing the EventManager and MsgHandler localy in every manager. This was needed to get rid of a circular references that preventet the eventmanager from freeing when psserver where destroyed. Cleaning up in this will allow us to get a lot less noice in the output from valgrind when checking for memory leaks. - Rewrote/simplified the way the Event thread was stopped, so that the design pattern is equal to the one used in the network thread. - Fixed a heap underflow on exit in the EventManger by rewriteing the way the event queue was destroyed. - Added call to close the DB connection when the db abstraction layer is destroyed. - Put some more CPrintfs at startup into log categories. - Rewrote every server manager to use the psengine->GetEventManager() instead of using the psengine->msghandler variable. - Removed the dublicate pointer msghandler in psServer. - Made sure that the psengine destroy every manager when itself is destroyed. - Added function to wordnet to close every filedescriptor nicely at exit. - Added printing of this sequence when quiting the server: Event thread stopped! Network thread stopped! Main thread stopped! If you don't get that, you have done something wrong! Index: wn.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/tools/wordnet/wn.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wn.h 24 Dec 2005 12:38:28 -0000 1.2 --- wn.h 27 Jan 2006 18:17:52 -0000 1.3 *************** *** 349,353 **** /* Top level function to close and reopen database files, initialize wn_filenames and open exception lists. */ ! extern int re_wninit(); /* Count the number of underscore or space separated words in a string. */ --- 349,356 ---- /* Top level function to close and reopen database files, initialize wn_filenames and open exception lists. */ ! extern int re_wninit(); ! ! /* Top level function to close database files */ ! extern int wnclose(); /* Count the number of underscore or space separated words in a string. */ Index: wnutil.c =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/tools/wordnet/wnutil.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wnutil.c 28 Dec 2005 23:12:11 -0000 1.5 --- wnutil.c 27 Jan 2006 18:17:52 -0000 1.6 *************** *** 80,83 **** --- 80,89 ---- } + int wnclose(void) + { + closefps(); + return 0; + } + static void closefps(void) { |