[cvslog] [CVS] Module eggdrop1.8: Change committed

cvs at eggheads.org cvs at eggheads.org
Tue Jun 19 08:27:27 CST 2012


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.8
Commit time: 2012-06-19 14:27:27 UTC
Committer  : Thomas Sader <thommey at gmail.com>

Modified files:
     doc/Changes1.8 src/patch.h src/tcl.c src/tclhash.h

Log message:

Partially revert changes to vwait/update as in 1.6.21.

---------------------- diff included ----------------------
Index: eggdrop1.8/doc/Changes1.8
diff -u eggdrop1.8/doc/Changes1.8:1.60 eggdrop1.8/doc/Changes1.8:1.61
--- eggdrop1.8/doc/Changes1.8:1.60	Sat Jun 16 10:04:02 2012
+++ eggdrop1.8/doc/Changes1.8	Tue Jun 19 08:27:17 2012
@@ -1,4 +1,4 @@
-$Id: Changes1.8,v 1.60 2012/06/16 16:04:02 thommey Exp $
+$Id: Changes1.8,v 1.61 2012/06/19 14:27:17 thommey Exp $
 
 Eggdrop Changes (since version 1.8.0)
 
@@ -6,6 +6,11 @@
 
 1.8.0 (CVS):
 
+  - Partially revert changes to vwait/update. They are back to only
+    processing Tcl events for now (fileevent/after) as handling eggdrop
+    events turned out to require careful examination of reentrance issues.
+    Patch by: thommey
+
   - Call Tcl's bgerror on Eggdrop background errors. This allows custom
     code to react to errors (and output full $::errorInfo, for example).
     Patch by: thommey
Index: eggdrop1.8/src/patch.h
diff -u eggdrop1.8/src/patch.h:1.41 eggdrop1.8/src/patch.h:1.42
--- eggdrop1.8/src/patch.h:1.41	Sat Jun 16 10:04:02 2012
+++ eggdrop1.8/src/patch.h	Tue Jun 19 08:27:17 2012
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.41 2012/06/16 16:04:02 thommey Exp $
+ * $Id: patch.h,v 1.42 2012/06/19 14:27:17 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1339862435");            /* current unixtime */
+patch("1340115594");            /* current unixtime */
 /*
  *
  *
  */
-patch("bgerror");
+patch("tclvwait");
 /*
  *
  *
Index: eggdrop1.8/src/tcl.c
diff -u eggdrop1.8/src/tcl.c:1.11 eggdrop1.8/src/tcl.c:1.12
--- eggdrop1.8/src/tcl.c:1.11	Sat Jun 16 10:04:02 2012
+++ eggdrop1.8/src/tcl.c	Tue Jun 19 08:27:17 2012
@@ -4,7 +4,7 @@
  *   Tcl initialization
  *   getting and setting Tcl/eggdrop variables
  *
- * $Id: tcl.c,v 1.11 2012/06/16 16:04:02 thommey Exp $
+ * $Id: tcl.c,v 1.12 2012/06/19 14:27:17 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -688,7 +688,13 @@
 int init_threaddata(int mainthread)
 {
   struct threaddata *td = threaddata();
-  td->mainloopfunc = mainthread ? mainloop : tclthreadmainloop;
+/* Nested evaluation (vwait/update) of the event loop only
+ * processes Tcl events (after/fileevent) for now. Using
+ * eggdrops mainloop() requires caution regarding reentrance.
+ * (check_tcl_* -> Tcl_Eval() -> mainloop() -> check_tcl_* etc.)
+ */
+/* td->mainloopfunc = mainthread ? mainloop : tclthreadmainloop; */
+  td->mainloopfunc = tclthreadmainloop;
   td->socklist = NULL;
   td->mainthread = mainthread;
   td->blocktime.tv_sec = 1;
Index: eggdrop1.8/src/tclhash.h
diff -u eggdrop1.8/src/tclhash.h:1.4 eggdrop1.8/src/tclhash.h:1.5
--- eggdrop1.8/src/tclhash.h:1.4	Wed Jan 26 19:41:08 2011
+++ eggdrop1.8/src/tclhash.h	Tue Jun 19 08:27:17 2012
@@ -1,7 +1,7 @@
 /*
  * tclhash.h
  *
- * $Id: tclhash.h,v 1.4 2011/01/27 01:41:08 thommey Exp $
+ * $Id: tclhash.h,v 1.5 2012/06/19 14:27:17 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -39,7 +39,8 @@
 } tcl_cmd_t;
 
 struct threaddata {
-  int (*mainloopfunc)(int);     /* main loop function */
+  int (*mainloopfunc)(int);     /* main loop function replacing a single
+                                 * tcl event loop iteration */
   sock_list *socklist;          /* tcl socket list for threads, else NULL */
   struct timeval blocktime;     /* maximum time to block in select() */
   int mainthread;               /* Is this the main thread? */
----------------------- End of diff -----------------------


More information about the Changes mailing list