From: SourceForge.net <no...@so...> - 2005-06-01 16:28:21
|
Patches item #1197934, was opened at 2005-05-08 19:38 Message generated for change (Comment added) made by rlaager You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300235&aid=1197934&group_id=235 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Closed Resolution: Accepted Priority: 5 Submitted By: Richard Laager (rlaager) Assigned to: Mark Doliner (thekingant) Summary: IRC File Descriptor Check Initial Comment: Gaim always prints IRC QUIT messages to the console. This patch corrects that. This patch will cause problems if an IRC socket ever uses file descriptor zero. On Linux, I don't think that's possible. I'm not sure on other operating systems. ---------------------------------------------------------------------- >Comment By: Richard Laager (rlaager) Date: 2005-06-01 11:28 Message: Logged In: YES user_id=156487 In irc.c, irc_send(), you'll see: if (irc->fd < 0) return -1; ret = write(irc->fd, buf, strlen(buf)); When Gaim quits, all of the IRC accounts fire off a QUIT message, even those that aren't connected. Those that were never connected have a FD of zero, causing the QUIT to go to my terminal. This fix ensures that nothing is written to an unconnected FD. ---------------------------------------------------------------------- Comment By: Mark Doliner (thekingant) Date: 2005-05-31 22:36 Message: Logged In: YES user_id=20979 I applied this to both HEAD and oldstatus. I'm a bit confused by the comments from the first patch... Gaim always prints IRC QUIT messages? As in, "printf("IRC QUIT");"? I don't see how initializing fd to -1 would help that. Am I missing something? ---------------------------------------------------------------------- Comment By: Richard Laager (rlaager) Date: 2005-05-08 21:45 Message: Logged In: YES user_id=156487 (21:22:48) Caleb Gilmour (hyphenated): rlaager: wouldn't it be nicer if you changed sslconn.c so that it does a gsc->fd = -1; in there after the g_new0 ? (it'd require more changes, but 0 isn't really appropriate for describing an undefined fd) (21:34:04) rlaager: hyphenated: I don't think that's required for the SSL stuff, but you have a good point. I'm redoing the patch to use that approach for IRC. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300235&aid=1197934&group_id=235 |