[cvslog] (2003-01-18 01:58:15 UTC) Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Fri Jan 17 19:59:00 CST 2003


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2003-01-18 01:58:15 UTC
Commited by: Will Buckner <wcc at techmonkeys.org>

Modified files:
     doc/UPDATES1.6 src/dccutil.c src/modules.c src/patch.h
     src/proto.h src/tcldcc.c src/mod/module.h

Log message:

Open file descriptors are now closed when the killdcc Tcl command is used
on a transfer socket. Found by fbs. Patch by fbs and Wcc.

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/UPDATES1.6
diff -u eggdrop1.6/doc/UPDATES1.6:1.443 eggdrop1.6/doc/UPDATES1.6:1.444
--- eggdrop1.6/doc/UPDATES1.6:1.443	Fri Jan 17 18:40:05 2003
+++ eggdrop1.6/doc/UPDATES1.6	Fri Jan 17 19:58:05 2003
@@ -1,10 +1,12 @@
-$Id: UPDATES1.6,v 1.443 2003/01/18 00:40:05 wcc Exp $
+$Id: UPDATES1.6,v 1.444 2003/01/18 01:58:05 wcc Exp $
 
 Changes in Eggdrop: (since v1.6.0)
 ----------------------------------
 
 1.6.14
 Found by  Fixed by  What...
+fbs       fbs/      open file descriptors are now closed when the killdcc Tcl
+          Wcc       command is used on a transfer socket
 never     Wcc       unixtime was not increased when eggdrop was blocked during
                     a series of in-line Tcl commands
 lee       Wcc       exported getchanmode()
Index: eggdrop1.6/src/dccutil.c
diff -u eggdrop1.6/src/dccutil.c:1.41 eggdrop1.6/src/dccutil.c:1.42
--- eggdrop1.6/src/dccutil.c:1.41	Mon Dec 23 20:30:04 2002
+++ eggdrop1.6/src/dccutil.c	Fri Jan 17 19:58:05 2003
@@ -6,7 +6,7 @@
  *   memory management for dcc structures
  *   timeout checking for dcc connections
  *
- * $Id: dccutil.c,v 1.41 2002/12/24 02:30:04 wcc Exp $
+ * $Id: dccutil.c,v 1.42 2003/01/18 01:58:05 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -252,6 +252,15 @@
       chanout_but(-1, dcc[idx].u.chat->channel,
 		  "*** %s joined the channel.\n", dcc[idx].nick);
     }
+  }
+}
+
+/* Closes an open FD for transfer sockets. */
+void killtransfer(int n)
+{
+  if (dcc[n].u.xfer->f) {
+    fclose(dcc[n].u.xfer->f);
+    dcc[n].u.xfer->f = NULL;
   }
 }
 
Index: eggdrop1.6/src/mod/module.h
diff -u eggdrop1.6/src/mod/module.h:1.63 eggdrop1.6/src/mod/module.h:1.64
--- eggdrop1.6/src/mod/module.h:1.63	Wed Dec 25 20:21:54 2002
+++ eggdrop1.6/src/mod/module.h	Fri Jan 17 19:58:05 2003
@@ -1,7 +1,7 @@
 /*
  * module.h
  *
- * $Id: module.h,v 1.63 2002/12/26 02:21:54 wcc Exp $
+ * $Id: module.h,v 1.64 2003/01/18 01:58:05 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -459,6 +459,7 @@
 #define MD5_Final ((void (*)(unsigned char *, MD5_CTX *))global[279])
 /* 280 - 283 */
 #define wild_match_per ((int (*)(const char *, const char *))global[280])
+#define killtransfer ((void(*)(int))global[281])
 
 /* This is for blowfish module, couldnt be bothered making a whole new .h
  * file for it ;)
Index: eggdrop1.6/src/modules.c
diff -u eggdrop1.6/src/modules.c:1.71 eggdrop1.6/src/modules.c:1.72
--- eggdrop1.6/src/modules.c:1.71	Wed Dec 25 20:21:53 2002
+++ eggdrop1.6/src/modules.c	Fri Jan 17 19:58:05 2003
@@ -4,7 +4,7 @@
  * 
  * by Darrin Smith (beldin at light.iinet.net.au)
  * 
- * $Id: modules.c,v 1.71 2002/12/26 02:21:53 wcc Exp $
+ * $Id: modules.c,v 1.72 2003/01/18 01:58:05 wcc Exp $
  */
 /* 
  * Copyright (C) 1997 Robey Pointer
@@ -546,7 +546,8 @@
   (Function) MD5_Update,
   (Function) MD5_Final,
   /* 280 - 283 */
-  (Function) _wild_match_per
+  (Function) _wild_match_per,
+  (Function) killtransfer
 };
 
 void init_modules(void)
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.871 eggdrop1.6/src/patch.h:1.872
--- eggdrop1.6/src/patch.h:1.871	Fri Jan 17 18:40:05 2003
+++ eggdrop1.6/src/patch.h	Fri Jan 17 19:58:05 2003
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.871 2003/01/18 00:40:05 wcc Exp $
+ * $Id: patch.h,v 1.872 2003/01/18 01:58:05 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1042848171");		/* current unixtime */
+patch("1042854837");		/* current unixtime */
 /*
  *
  *
  */
-patch("unixtime_incr");
+patch("transfer-close");
 /*
  *
  *
Index: eggdrop1.6/src/proto.h
diff -u eggdrop1.6/src/proto.h:1.51 eggdrop1.6/src/proto.h:1.52
--- eggdrop1.6/src/proto.h:1.51	Wed Dec 25 20:21:53 2002
+++ eggdrop1.6/src/proto.h	Fri Jan 17 19:58:05 2003
@@ -7,7 +7,7 @@
  * because they use structures in those
  * (saves including those .h files EVERY time) - Beldin
  *
- * $Id: proto.h,v 1.51 2002/12/26 02:21:53 wcc Exp $
+ * $Id: proto.h,v 1.52 2003/01/18 01:58:05 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -135,6 +135,7 @@
 void chanout_but EGG_VARARGS(int, arg1);
 void dcc_chatter(int);
 void lostdcc(int);
+void killtransfer(int);
 void removedcc(int);
 void makepass(char *);
 void tell_dcc(int);
Index: eggdrop1.6/src/tcldcc.c
diff -u eggdrop1.6/src/tcldcc.c:1.37 eggdrop1.6/src/tcldcc.c:1.38
--- eggdrop1.6/src/tcldcc.c:1.37	Mon Dec 23 21:33:24 2002
+++ eggdrop1.6/src/tcldcc.c	Fri Jan 17 19:58:05 2003
@@ -2,7 +2,7 @@
  * tcldcc.c -- handles:
  *   Tcl stubs for the dcc commands
  *
- * $Id: tcldcc.c,v 1.37 2002/12/24 03:33:24 wcc Exp $
+ * $Id: tcldcc.c,v 1.38 2003/01/18 01:58:05 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -494,6 +494,7 @@
     /* Notice is sent to the party line, the script can add a reason. */
   }
   killsock(dcc[idx].sock);
+  killtransfer(idx);
   lostdcc(idx);
   return TCL_OK;
 }
----------------------- End of diff -----------------------



More information about the Changes mailing list