Revision: 1932
http://undernet-ircu.svn.sourceforge.net/undernet-ircu/?rev=1932&view=rev
Author: entrope
Date: 2010-01-04 00:37:28 +0000 (Mon, 04 Jan 2010)
Log Message:
-----------
Revert the accidental commit to list.c, and commit the correct file (s_bsd.c).
Modified Paths:
--------------
ircu2/branches/u2_10_12_branch/ircd/list.c
ircu2/branches/u2_10_12_branch/ircd/s_bsd.c
Modified: ircu2/branches/u2_10_12_branch/ircd/list.c
===================================================================
--- ircu2/branches/u2_10_12_branch/ircd/list.c 2010-01-04 00:33:41 UTC (rev
1931)
+++ ircu2/branches/u2_10_12_branch/ircd/list.c 2010-01-04 00:37:28 UTC (rev
1932)
@@ -427,9 +427,6 @@
*/
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;
@@ -437,7 +434,6 @@
lp = (struct SLink*) MyMalloc(sizeof(struct SLink));
links.alloc++;
}
-#endif
assert(0 != lp);
links.inuse++;
memset(lp, 0, sizeof(*lp));
@@ -450,12 +446,8 @@
void free_link(struct SLink* lp)
{
if (lp) {
-#if 1
- MyFree(lp);
-#else
lp->next = slinkFreeList;
slinkFreeList = lp;
-#endif
links.inuse--;
}
}
Modified: ircu2/branches/u2_10_12_branch/ircd/s_bsd.c
===================================================================
--- ircu2/branches/u2_10_12_branch/ircd/s_bsd.c 2010-01-04 00:33:41 UTC (rev
1931)
+++ ircu2/branches/u2_10_12_branch/ircd/s_bsd.c 2010-01-04 00:37:28 UTC (rev
1932)
@@ -862,6 +862,11 @@
case ET_ERROR: /* an error occurred */
fallback = cli_info(cptr);
cli_error(cptr) = ev_data(ev);
+ /* If the OS told us we have a bad file descriptor, we should
+ * record that for future reference.
+ */
+ if (cli_error(cptr) == EBADF)
+ cli_fd(cptr) = -1;
if (s_state(&(con_socket(con))) == SS_CONNECTING) {
completed_connection(cptr);
/* for some reason, the os_get_sockerr() in completed_connect()
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