Re: kdeprint still crashing in sid ( fix backported to kde 3_1 branch on thursday)
[ Saturday 29 March 2003 10:37 am ]
| On Friday 28 March 2003 09:01, Norbert Preining wrote:
| > Hi!
| >
| > I tried everything I could find in this list:
| > * My /etc/hosts now just contains
| > 127.0.0.1 my.host.name localhost
| > (and I tried several other combinations)
| > * I removed .kde
| >
| > Nothing worked, kprinter always crashes.
| > It connects to the cups server (I see the POST of /printers/ and
| > /classes/ in the cups log file), but the kdecore component KSocket
| > always crashes:
Thiago Macieira fixed it in CVS a few days ago
KDE_3_1_BRANCH: kdelibs/kdecore
From:
Thiago Macieira <thiagom@mail.com>
To:
kde-cvs@kde.org
CC:
56263-done@bugs.kde.org
Date:
Thursday 01:20:23 am
CVS commit by thiago:
Backport from HEAD of the fix to bug #56263. There are one improvement or
two left in HEAD that could be backported, but I'll wait a day or two to
be sure that they don't break anything else.
To the bug reporters: thanks again for the help
CCMAIL: 56263-done@bugs.kde.org
M +16 -6 kextsock.cpp 1.44.2.5
--- kdelibs/kdecore/kextsock.cpp #1.44.2.4:1.44.2.5
@@ -380,4 +380,7 @@ void KExtendedSocketLookup::freeresults(
{
addrinfo *ai = res->data;
+ if (ai == NULL)
+ return; // No data? Bizarre, but nonetheless possible
+
if (ai->ai_canonname)
free(ai->ai_canonname);
@@ -1505,9 +1508,7 @@ void KExtendedSocket::close()
void KExtendedSocket::closeNow()
{
- if (sockfd == -1 || d->status >= done)
+ if (d->status >= done)
return; // nothing to close
- d->status = done;
-
// close the socket
delete d->qsnIn;
@@ -1515,6 +1516,15 @@ void KExtendedSocket::closeNow()
d->qsnIn = d->qsnOut = NULL;
+ if (d->status > connecting && sockfd != -1)
+ {
::close(sockfd);
sockfd = -1;
+ }
+ else if (d->status == connecting)
+ cancelAsyncConnect();
+ else if (d->status == lookupInProgress)
+ cancelAsyncLookup();
+
+ d->status = done;
emit closed(closedNow |
C.
--
| Christophe Prud'homme, http://augustine.mit.edu/~prudhomm
| ICQ UIN: 24560867 Alias: Jesunix
| Key fingerprint = 3703 50DE 7A9F 024E 0F26 0D07 A18F B40B D4BE 1450
|
| It's not whether you win or lose, it's how you place the blame.
Reply to: