]> jfr.im git - irc.git/blob - software/RELEASES/ircservices/achurch.org/services/lists/ircservices/2008/005660.html
rename -> *.git
[irc.git] / software / RELEASES / ircservices / achurch.org / services / lists / ircservices / 2008 / 005660.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE> [IRCServices] Patch: Flush write buffer on connect
5 </TITLE>
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="005658.html">
11 <LINK REL="Next" HREF="005661.html">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices] Patch: Flush write buffer on connect</H1>
15 <B>Alexander Barton</B>
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">alex at barton.de
18 </A><BR>
19 <I>Thu Nov 20 13:45:22 PST 2008</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="005658.html">[IRCServices] Patch: Flush write buffer on connect
22 </A></li>
23 <LI>Next message: <A HREF="005661.html">[IRCServices] Patch: Flush write buffer on connect
24 </A></li>
25 <LI> <B>Messages sorted by:</B>
26 <a href="date.html#5660">[ date ]</a>
27 <a href="thread.html#5660">[ thread ]</a>
28 <a href="subject.html#5660">[ subject ]</a>
29 <a href="author.html#5660">[ author ]</a>
30 </LI>
31 </UL>
32 <HR>
33 <!--beginarticle-->
34 <PRE>Hi all!
35
36 Any comments to this patch?
37
38 Regards
39 Alex
40
41 Am 11.11.2008 18:14, Alexander Barton schrieb:
42
43 &gt;<i> Hi!
44 </I>&gt;<i>
45 </I>&gt;<i> The attached patch fixes the problem that IRCServices don't flush the
46 </I>&gt;<i> write buffer when the connection to the server is establised and data
47 </I>&gt;<i> has already been written to the buffer.
48 </I>&gt;<i>
49 </I>&gt;<i> This caused the server to disconnect IRCServices after a timeout
50 </I>&gt;<i> because of no data has been sent. Solution has been to send
51 </I>&gt;<i> IRCServices a HUP signal right after starting it. I was able to
52 </I>&gt;<i> reproduce this problem on all of my machines (Linux on HPPA, Linux on
53 </I>&gt;<i> amd64, and Mac OS X on i386).
54 </I>&gt;<i>
55 </I>&gt;<i> I think these messages describe the same problem:
56 </I>&gt;<i> &lt;<A HREF="http://lists.ircservices.za.net/pipermail/ircservices/2007/005283.html">http://lists.ircservices.za.net/pipermail/ircservices/2007/005283.html</A>&gt;
57 </I>&gt;<i> &lt;<A HREF="http://lists.ircservices.za.net/pipermail/ircservices/2007/005288.html">http://lists.ircservices.za.net/pipermail/ircservices/2007/005288.html</A>&gt;
58 </I>&gt;<i> &lt;<A HREF="http://lists.ircservices.za.net/pipermail/ircservices/2007/005318.html">http://lists.ircservices.za.net/pipermail/ircservices/2007/005318.html</A>&gt;
59 </I>&gt;<i> &lt;<A HREF="http://lists.ircservices.za.net/pipermail/ircservices/2007/005319.html">http://lists.ircservices.za.net/pipermail/ircservices/2007/005319.html</A>&gt;
60 </I>&gt;<i> &lt;<A HREF="http://lists.ircservices.za.net/pipermail/ircservices/2007/005287.html">http://lists.ircservices.za.net/pipermail/ircservices/2007/005287.html</A>&gt;
61 </I>&gt;<i>
62 </I>&gt;<i> Regards
63 </I>&gt;<i> Alex
64 </I>&gt;<i>
65 </I>&gt;<i>
66 </I>&gt;<i> diff -rup ircservices-5.1.13-orig/sockets.c ircservices-5.1.13/sockets.c
67 </I>&gt;<i> --- ircservices-5.1.13-orig/sockets.c 2008-11-07 18:11:57.000000000
68 </I>&gt;<i> +0100
69 </I>&gt;<i> +++ ircservices-5.1.13/sockets.c 2008-11-09 15:53:35.000000000 +0100
70 </I>&gt;<i> @@ -691,6 +691,10 @@ void check_sockets(void)
71 </I>&gt;<i> }
72 </I>&gt;<i> s-&gt;flags &amp;= ~SF_CONNECTING;
73 </I>&gt;<i> s-&gt;flags |= SF_CONNECTED;
74 </I>&gt;<i> +
75 </I>&gt;<i> + /* Flush already cached data for this socket */
76 </I>&gt;<i> + flush_write_buffer(s);
77 </I>&gt;<i> +
78 </I>&gt;<i> FD_CLR(i, &amp;write_fds);
79 </I>&gt;<i> if (!(s-&gt;flags &amp; SF_MUTE))
80 </I>&gt;<i> FD_SET(i, &amp;sock_fds);
81 </I>&gt;<i>
82 </I>
83
84 </PRE>
85
86
87
88
89
90 <!--endarticle-->
91 <HR>
92 <P><UL>
93 <!--threads-->
94 <LI>Previous message: <A HREF="005658.html">[IRCServices] Patch: Flush write buffer on connect
95 </A></li>
96 <LI>Next message: <A HREF="005661.html">[IRCServices] Patch: Flush write buffer on connect
97 </A></li>
98 <LI> <B>Messages sorted by:</B>
99 <a href="date.html#5660">[ date ]</a>
100 <a href="thread.html#5660">[ thread ]</a>
101 <a href="subject.html#5660">[ subject ]</a>
102 <a href="author.html#5660">[ author ]</a>
103 </LI>
104 </UL>
105
106 </body></html>