1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2//EN">
4 <TITLE> [IRCServices] Patch: Flush write buffer on connect
6 <LINK REL=
"Index" HREF=
"index.html" >
7 <LINK REL=
"made" HREF=
"mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20Patch%3A%20Flush%20write%20buffer%20on%20connect&In-Reply-To=8F785A9C-E1E6-4171-BDED-3DA4C6B854DF%40barton.de">
8 <META NAME=
"robots" CONTENT=
"index,nofollow">
9 <META http-equiv=
"Content-Type" content=
"text/html; charset=us-ascii">
10 <LINK REL=
"Previous" HREF=
"005662.html">
11 <LINK REL=
"Next" HREF=
"005659.html">
13 <BODY BGCOLOR=
"#ffffff">
14 <H1>[IRCServices] Patch: Flush write buffer on connect
</H1>
16 <A HREF=
"mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20Patch%3A%20Flush%20write%20buffer%20on%20connect&In-Reply-To=8F785A9C-E1E6-4171-BDED-3DA4C6B854DF%40barton.de"
17 TITLE=
"[IRCServices] Patch: Flush write buffer on connect">achurch at achurch.org
19 <I>Sun Dec
7 20:
18:
39 PST
2008</I>
21 <LI>Previous message:
<A HREF=
"005662.html">[IRCServices] Patch: Flush write buffer on connect
23 <LI>Next message:
<A HREF=
"005659.html">[IRCServices] 'recursive' crashing (Abort trap
6)
25 <LI> <B>Messages sorted by:
</B>
26 <a href=
"date.html#5669">[ date ]
</a>
27 <a href=
"thread.html#5669">[ thread ]
</a>
28 <a href=
"subject.html#5669">[ subject ]
</a>
29 <a href=
"author.html#5669">[ author ]
</a>
34 <PRE>Fixed for the next release. Thanks for the report!
37 <A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices">achurch at achurch.org
</A>
38 <A HREF=
"http://achurch.org/">http://achurch.org/
</A>
42 </I>><i>The attached patch fixes the problem that IRCServices don't flush the
43 </I>><i>write buffer when the connection to the server is establised and data
44 </I>><i>has already been written to the buffer.
46 </I>><i>This caused the server to disconnect IRCServices after a timeout
47 </I>><i>because of no data has been sent. Solution has been to send
48 </I>><i>IRCServices a HUP signal right after starting it. I was able to
49 </I>><i>reproduce this problem on all of my machines (Linux on HPPA, Linux on
50 </I>><i>amd64, and Mac OS X on i386).
52 </I>><i>I think these messages describe the same problem:
53 </I>><i><<A HREF=
"http://lists.ircservices.za.net/pipermail/ircservices/2007/005283.html">http://lists.ircservices.za.net/pipermail/ircservices/
2007/
005283.html
</A>>
54 </I>><i><<A HREF=
"http://lists.ircservices.za.net/pipermail/ircservices/2007/005288.html">http://lists.ircservices.za.net/pipermail/ircservices/
2007/
005288.html
</A>>
55 </I>><i><<A HREF=
"http://lists.ircservices.za.net/pipermail/ircservices/2007/005318.html">http://lists.ircservices.za.net/pipermail/ircservices/
2007/
005318.html
</A>>
56 </I>><i><<A HREF=
"http://lists.ircservices.za.net/pipermail/ircservices/2007/005319.html">http://lists.ircservices.za.net/pipermail/ircservices/
2007/
005319.html
</A>>
57 </I>><i><<A HREF=
"http://lists.ircservices.za.net/pipermail/ircservices/2007/005287.html">http://lists.ircservices.za.net/pipermail/ircservices/
2007/
005287.html
</A>>
63 </I>><i>diff -rup ircservices-
5.1.13-orig/sockets.c ircservices-
5.1.13/sockets.c
64 </I>><i>--- ircservices-
5.1.13-orig/sockets.c
2008-
11-
07 18:
11:
57.000000000
66 </I>><i>+++ ircservices-
5.1.13/sockets.c
2008-
11-
09 15:
53:
35.000000000 +
0100
67 </I>><i>@@ -
691,
6 +
691,
10 @@ void check_sockets(void)
69 </I>><i> s-
>flags
&= ~SF_CONNECTING;
70 </I>><i> s-
>flags |= SF_CONNECTED;
72 </I>><i>+ /* Flush already cached data for this socket */
73 </I>><i>+ flush_write_buffer(s);
75 </I>><i> FD_CLR(i,
&write_fds);
76 </I>><i> if (!(s-
>flags
& SF_MUTE))
77 </I>><i> FD_SET(i,
&sock_fds);
79 </I>><i>------------------------------------------------------------------
80 </I>><i>To unsubscribe or change your subscription options, visit:
81 </I>><i><A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices">http://lists.ircservices.za.net/mailman/listinfo/ircservices
</A>
88 <LI>Previous message:
<A HREF=
"005662.html">[IRCServices] Patch: Flush write buffer on connect
90 <LI>Next message:
<A HREF=
"005659.html">[IRCServices] 'recursive' crashing (Abort trap
6)
92 <LI> <B>Messages sorted by:
</B>
93 <a href=
"date.html#5669">[ date ]
</a>
94 <a href=
"thread.html#5669">[ thread ]
</a>
95 <a href=
"subject.html#5669">[ subject ]
</a>
96 <a href=
"author.html#5669">[ author ]
</a>