#340 closed defect (fixed)
[patch] fix IM connections to the same host as the one running bitlbee
Reported by: | Owned by: | wilmer | |
---|---|---|---|
Priority: | normal | Milestone: | 1.2 |
Component: | BitlBee | Version: | 1.0.3 |
Keywords: | localhost connection patch hang | Cc: | |
IRC client+version: | Client-independent | Operating System: | OpenBSD |
OS version/distro: | OpenBSD/i386 4.2 |
Description
When you try to connect to a jabberd daemon located on the same host that's running bitlbee, it hangs indefinitely because the gaim_io_connected
function is never called: it's called only by the async event infrastructure, but in this case there is no asynchronous event to be triggered as the connection is successfully established before the connect(2)
syscall returns.
This small patch fixes this bug:
--- proxy.c.orig Thu Dec 27 20:07:52 2007 +++ proxy.c Thu Dec 27 20:01:53 2007 @@ -172,6 +172,9 @@ return -1; } } + else { + gaim_io_connected(phb, fd, GAIM_INPUT_WRITE); + } return fd; }
... and now i'm able to connect to my own jabberd :).
All of this happens on my OpenBSD/i386 server, don't know if other OSs exhibit different behavior.
Attachments (0)
Change History (5)
comment:1 Changed at 2007-12-27T19:47:27Z by
comment:2 Changed at 2007-12-27T22:32:52Z by
Milestone: | → 1.2 |
---|---|
Owner: | set to wilmer |
Hah, nice catch! This was a known bug, actually: #233. Just that apparently it's closed now, I'm afraid some history got lost there thanks to spamming @&%*)@& lowlifes.
Anyway, now we can really close that bug then. I'll add a milestone to make sure this gets applied in time. Thanks!
comment:4 Changed at 2007-12-27T23:49:33Z by
BTW, I'm not sure if this is always the right solution. There might be code that assumes that the code after proxy_connect() will run before the _connected() event handler, and this patch will break that assumption...
Probably the code in the sockerr_again() block should also be called if the connect() was successful already. I guess I got rid of that part when I made this stuff non-blocking.
comment:5 Changed at 2007-12-28T23:30:14Z by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in r290.
... sorry for the indenting! I use sw=2 and expandtab ..