[cvslog] Module eggdrop1.6: Change committed

cvslog cvs at tsss.iavalley.cc.ia.us
Tue Dec 5 20:36:01 CST 2000


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2000-12-06 02:35:28 UTC

Modified files:
     doc/UPDATES1.6 src/patch.h src/users.c
     src/mod/channels.mod/userchan.c src/mod/transfer.mod/transfer.c

Log message:

guppy: fabian's transfer_fclose_fix

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/UPDATES1.6
diff -u eggdrop1.6/doc/UPDATES1.6:1.29 eggdrop1.6/doc/UPDATES1.6:1.30
--- eggdrop1.6/doc/UPDATES1.6:1.29	Tue Dec  5 20:32:17 2000
+++ eggdrop1.6/doc/UPDATES1.6	Tue Dec  5 20:35:18 2000
@@ -4,6 +4,8 @@
 
 1.6.2
 Found by  Fixed by  What...
+fabulous  Fabian    Two calls to fclose() were missing in transfer.mod, causing
+                    eggdrop to leak file descriptors.
           Eule      hopefully fixed the cycle-flood problem on some efnet
                     servers
           Eule      autovoice now uses autoop delay also
Index: eggdrop1.6/src/mod/channels.mod/userchan.c
diff -u eggdrop1.6/src/mod/channels.mod/userchan.c:1.20 eggdrop1.6/src/mod/channels.mod/userchan.c:1.21
--- eggdrop1.6/src/mod/channels.mod/userchan.c:1.20	Tue Nov 21 16:30:24 2000
+++ eggdrop1.6/src/mod/channels.mod/userchan.c	Tue Dec  5 20:35:18 2000
@@ -1,7 +1,7 @@
 /* 
  * userchan.c -- part of channels.mod
  * 
- * $Id: userchan.c,v 1.20 2000/11/21 22:30:24 guppy Exp $
+ * $Id: userchan.c,v 1.21 2000/12/06 02:35:18 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -1274,7 +1274,7 @@
   if (!m || !chan_hasop(m) || !rfc_casecmp(m->nick, botname))
     return 1;
 
-  /* At this point we now the person/bot who set the mask is currently
+  /* At this point we know the person/bot who set the mask is currently
    * present in the channel and has op.
    */
 
Index: eggdrop1.6/src/mod/transfer.mod/transfer.c
diff -u eggdrop1.6/src/mod/transfer.mod/transfer.c:1.31 eggdrop1.6/src/mod/transfer.mod/transfer.c:1.32
--- eggdrop1.6/src/mod/transfer.mod/transfer.c:1.31	Sun Nov  5 22:06:45 2000
+++ eggdrop1.6/src/mod/transfer.mod/transfer.c	Tue Dec  5 20:35:18 2000
@@ -1,7 +1,7 @@
 /* 
  * transfer.c -- part of transfer.mod
  * 
- * $Id: transfer.c,v 1.31 2000/11/06 04:06:45 guppy Exp $
+ * $Id: transfer.c,v 1.32 2000/12/06 02:35:18 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -160,8 +160,10 @@
   for (i = 0; i < dcc_total; i++)
     if (i != idx)
       if (dcc[i].type == &DCC_GET || dcc[i].type == &DCC_GET_PENDING)
-	if (!strcmp(dcc[i].u.xfer->filename, fn))
+	if (!strcmp(dcc[i].u.xfer->filename, fn)) {
 	  ok = 0;
+	  break;
+	}
   if (ok)
     unlink(fn);
 }
@@ -746,12 +748,12 @@
   struct userrec *u;
 
   Context;
+  fclose(dcc[idx].u.xfer->f);
   if (dcc[idx].u.xfer->length == dcc[idx].status) {
     int l;
 
     /* Success */
     ok = 0;
-    fclose(dcc[idx].u.xfer->f);
     if (!strcmp(dcc[idx].nick, "*users")) {
       module_entry *me = module_find("share", 0, 0);
 
@@ -825,7 +827,6 @@
   }
   /* Failure :( */
   Context;
-  fclose(dcc[idx].u.xfer->f);
   if (!strcmp(dcc[idx].nick, "*users")) {
     int x, y = 0;
 
@@ -1149,6 +1150,7 @@
   char xx[1024];
 
   Context;
+  fclose(dcc[i].u.xfer->f);
   if (strcmp(dcc[i].nick, "*users") == 0) {
     int x, y = 0;
 
@@ -1395,6 +1397,7 @@
     dprintf(DP_HELP, "NOTICE %s :Bad connection (%s)\n", dcc[idx].nick, s);
     putlog(LOG_FILES, "*", "DCC bad connection: GET %s (%s!%s)",
 	   dcc[idx].u.xfer->origname, dcc[idx].nick, dcc[idx].host);
+    fclose(dcc[idx].u.xfer->f);
     lostdcc(idx);
     return;
   }
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.396 eggdrop1.6/src/patch.h:1.397
--- eggdrop1.6/src/patch.h:1.396	Tue Dec  5 20:32:17 2000
+++ eggdrop1.6/src/patch.h	Tue Dec  5 20:35:18 2000
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  * 
- * $Id: patch.h,v 1.396 2000/12/06 02:32:17 guppy Exp $
+ * $Id: patch.h,v 1.397 2000/12/06 02:35:18 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("976068938");		/* current unixtime */
+patch("976069404");		/* current unixtime */
 /*
  *
  *
  */
-patch("efnetcycle");
+patch("transfer_fclose");
 /*
  *
  *
Index: eggdrop1.6/src/users.c
diff -u eggdrop1.6/src/users.c:1.21 eggdrop1.6/src/users.c:1.22
--- eggdrop1.6/src/users.c:1.21	Mon Nov 20 22:55:45 2000
+++ eggdrop1.6/src/users.c	Tue Dec  5 20:35:18 2000
@@ -10,7 +10,7 @@
  * 
  * dprintf'ized, 9nov1995
  * 
- * $Id: users.c,v 1.21 2000/11/21 04:55:45 guppy Exp $
+ * $Id: users.c,v 1.22 2000/12/06 02:35:18 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -870,14 +870,13 @@
 	    }
 	  } 
 	} else if (!strncmp(code, "--", 2)) {
-	  /* new format storage */
-	  struct user_entry *ue;
-	  int ok = 0;
-
-	  Context;
 	  if (u) {
-	    ue = u->entries;
-	    for (; ue && !ok; ue = ue->next)
+	    /* new format storage */
+	    struct user_entry *ue;
+	    int ok = 0;
+
+	    Context;
+	    for (ue = u->entries; ue && !ok; ue = ue->next)
 	      if (ue->name && !egg_strcasecmp(code + 2, ue->name)) {
 		struct list_type *list;
 
----------------------- End of diff -----------------------



More information about the Changes mailing list