[prev in list] [next in list] [prev in thread] [next in thread]
List: atlantik-devel
Subject: [atlantik-cvs] CVS: kdegames/atlantik/client monopigator.cpp, 1.18,
From: kde () office ! kde ! org
Date: 2004-05-23 0:49:11
Message-ID: 40AFF507.mail5RV1Q7NWM () office ! kde ! org
[Download RAW message or body]
Update of /home/kde/kdegames/atlantik/client
In directory office:/tmp/cvs-serv7453/client
Modified Files:
Tag: KDE_3_2_BRANCH
monopigator.cpp
Log Message:
backport: don't crash when an unresolvable host is in the meta server list
Index: monopigator.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/monopigator.cpp,v
retrieving revision 1.18
retrieving revision 1.18.2.1
diff -u -d -r1.18 -r1.18.2.1
--- monopigator.cpp 23 Nov 2003 18:42:25 -0000 1.18
+++ monopigator.cpp 23 May 2004 00:49:09 -0000 1.18.2.1
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2003 Rob Kaper <cap@capsi.com>
+// Copyright (c) 2002-2004 Rob Kaper <cap@capsi.com>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@ -113,13 +113,17 @@
// setEnabled(false);
parent->sort();
- m_latencyTimer = new KLatencyTimer(port.toInt(), this, "latencyTimer");
QPtrList<KAddressInfo> addresses = KExtendedSocket::lookup(host, port);
addresses.setAutoDelete(true);
- m_latencyTimer->setHost(addresses.first()->address());
+ m_latencyTimer = new KLatencyTimer(port.toInt(), this, "latencyTimer");
- connect(m_latencyTimer, SIGNAL(answer(int)), this, SLOT(updateLatency(int)));
- m_latencyTimer->start();
+ if ( addresses.count() )
+ {
+ m_latencyTimer->setHost(addresses.first()->address());
+
+ connect(m_latencyTimer, SIGNAL(answer(int)), this, SLOT(updateLatency(int)));
+ m_latencyTimer->start();
+ }
}
void MonopigatorEntry::updateLatency(int msec)
_______________________________________________
atlantik-cvs mailing list
atlantik-cvs@kde.org
https://mail.kde.org/mailman/listinfo/atlantik-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic