Revision: 1931
          
http://undernet-ircu.svn.sourceforge.net/undernet-ircu/?rev=1931&view=rev
Author:   entrope
Date:     2010-01-04 00:33:41 +0000 (Mon, 04 Jan 2010)

Log Message:
-----------
Attempt to fix SF bug #2874316 by invalidating a file descriptor that the 
system claims is bad.

Modified Paths:
--------------
    ircu2/branches/u2_10_12_branch/ChangeLog
    ircu2/branches/u2_10_12_branch/ircd/list.c

Modified: ircu2/branches/u2_10_12_branch/ChangeLog
===================================================================
--- ircu2/branches/u2_10_12_branch/ChangeLog    2010-01-03 21:50:50 UTC (rev 
1930)
+++ ircu2/branches/u2_10_12_branch/ChangeLog    2010-01-04 00:33:41 UTC (rev 
1931)
@@ -1,5 +1,10 @@
 2010-01-03  Michael Poole <[email protected]>
 
+       * ircd/s_bsd.c (client_sock_callback): Invalidate cli_fd() when we
+       receive an EBADF error.
+
+2010-01-03  Michael Poole <[email protected]>
+
        * ircd/engine_select.c (engine_loop): Remove a bogus assert() that
        the structure's FD is correct after the event-handling callback
        returns.  Also fix a warning about the type of the last parameter

Modified: ircu2/branches/u2_10_12_branch/ircd/list.c
===================================================================
--- ircu2/branches/u2_10_12_branch/ircd/list.c  2010-01-03 21:50:50 UTC (rev 
1930)
+++ ircu2/branches/u2_10_12_branch/ircd/list.c  2010-01-04 00:33:41 UTC (rev 
1931)
@@ -427,6 +427,9 @@
  */
 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 @@
     lp = (struct SLink*) MyMalloc(sizeof(struct SLink));
     links.alloc++;
   }
+#endif
   assert(0 != lp);
   links.inuse++;
   memset(lp, 0, sizeof(*lp));
@@ -446,8 +450,12 @@
 void free_link(struct SLink* lp)
 {
   if (lp) {
+#if 1
+    MyFree(lp);
+#else
     lp->next = slinkFreeList;
     slinkFreeList = lp;
+#endif
     links.inuse--;
   }
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to