[atlantik-cvs] CVS: kdegames/atlantik/client atlantik.cpp,1.121.6.14,1.121.6.15
| Newsgroups | gmane.comp.kde.devel.atlantik |
|---|---|
| Message-ID | <[email protected]> |
Update of /home/kde/kdegames/atlantik/client
In directory office:/tmp/cvs-serv32463/client
Modified Files:
Tag: KDE_3_1_BRANCH
atlantik.cpp
Log Message:
backport: better cookie handling
Index: atlantik.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/atlantik.cpp,v
retrieving revision 1.121.6.14
retrieving revision 1.121.6.15
diff -u -d -r1.121.6.14 -r1.121.6.15
--- atlantik.cpp 18 Jun 2003 00:58:49 -0000 1.121.6.14
+++ atlantik.cpp 22 Jun 2003 00:14:26 -0000 1.121.6.15
@@ -564,10 +564,21 @@
{
KConfig *config = kapp->config();
- config->setGroup("Reconnection");
- config->writeEntry("Host", m_atlantikNetwork->host());
- config->writeEntry("Port", m_atlantikNetwork->port());
- config->writeEntry("Cookie", cookie);
+ if (cookie.isNull())
+ {
+ if (config->hasGroup("Reconnection"))
+ config->deleteGroup("Reconnection", true);
+ }
+ else if (m_atlantikNetwork)
+ {
+ config->setGroup("Reconnection");
+ config->writeEntry("Host", m_atlantikNetwork->host());
+ config->writeEntry("Port", m_atlantikNetwork->port());
+ config->writeEntry("Cookie", cookie);
+ }
+ else
+ return;
+
config->sync();
}