Attempt to fix SF bug #2874316 by invalidating a file descriptor that the system...
authorMichael Poole <mdpoole@troilus.org>
Mon, 4 Jan 2010 00:33:41 +0000 (00:33 +0000)
committerMichael Poole <mdpoole@troilus.org>
Mon, 4 Jan 2010 00:33:41 +0000 (00:33 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1931 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/list.c

index 11e18d3d7553a5b4268419a891a1f5b3abc6d0bb..20e3c8a11b76e4deddaff4ec92f8b3d0cb31abe6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-03  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/s_bsd.c (client_sock_callback): Invalidate cli_fd() when we
+       receive an EBADF error.
+
 2010-01-03  Michael Poole <mdpoole@troilus.org>
 
        * ircd/engine_select.c (engine_loop): Remove a bogus assert() that
index d304e162d6ac5875f91750db5f6ac036a268b006..f6a11328ffedbc84b6f3f4a65309aa77b6bd9c15 100644 (file)
@@ -427,6 +427,9 @@ void verify_client_list(void)
  */
 struct SLink* make_link(void)
 {
+#if 1
+  struct SLink* lp = (struct SLink*) MyMalloc(sizeof(struct SLink));
+#else
   struct SLink* lp = slinkFreeList;
   if (lp)
     slinkFreeList = lp->next;
@@ -434,6 +437,7 @@ struct SLink* make_link(void)
     lp = (struct SLink*) MyMalloc(sizeof(struct SLink));
     links.alloc++;
   }
+#endif
   assert(0 != lp);
   links.inuse++;
   memset(lp, 0, sizeof(*lp));
@@ -446,8 +450,12 @@ struct SLink* make_link(void)
 void free_link(struct SLink* lp)
 {
   if (lp) {
+#if 1
+    MyFree(lp);
+#else
     lp->next = slinkFreeList;
     slinkFreeList = lp;
+#endif
     links.inuse--;
   }
 }