Re: kopete (KDE 4.3.0) and Yahoo (fixed)
Sverre Froyen <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.pkgsrc.wip.general |
|---|---|
| Organization | Viewmark, Inc. |
| Message-ID | <[email protected]> |
Hi,
It appears that not many use kopete with Yahoo, but for those who do and have
connection problems, the following patch (to kdelibs4) may help.
The connection failure that I am seeing happens because the Yahoo connection
socket has its mode set to read-only. Kopete is therefore unable to send any
data to Yahoo.
Analysis:
When the socket is set up (by KBufferedSocket), the default mode is read-only.
Later the method "connect" is called with the hostname and port. At this
point, the KBufferedSocket instance is changed to read-write but the internal
socket device (returned by the socketDevice() call) is still read-only. The
reason for that is that the call to KSocketDevice::connect follows the path
if (kde_connect(m_sockfd, address.address(), address.length()) == -1)
{
if (errno == EISCONN)
return true; <--- we end up here!!!
bypassing the open call (at the bottom of the function) that sets the mode to
read-write.
The patch corrects this.
Regards,
Sverre
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
pkgsrc-wip-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pkgsrc-wip-discuss
patch-za
(text/x-patch, 628 B)
--- kdecore/network/k3socketdevice.cpp.orig 2009-09-24 09:21:38.000000000 -0600
+++ kdecore/network/k3socketdevice.cpp 2009-09-24 09:23:15.000000000 -0600
@@ -352,9 +352,13 @@ bool KSocketDevice::connect(const KResol
if (kde_connect(m_sockfd, address.address(), address.length()) == -1)
{
if (errno == EISCONN)
- return true; // we're already connected
+ {
+ KActiveSocketBase::open(Unbuffered | mode);
+ return true; // we're already connected
+ }
else if (errno == EALREADY || errno == EINPROGRESS)
{
+ KActiveSocketBase::open(Unbuffered | mode);
setError(InProgress);
return true;
}