[PATCH] Fix a segfault with old config and configure issue

Robert Buchholz rbu at gentoo.org
Fri Aug 31 19:44:51 CEST 2007


On Friday, 31. August 2007, Helmut Schaa wrote:
> Am Donnerstag, 30. August 2007 22:41:48 schrieb Robert Buchholz:
> > First, after uninstalling a vpn plugin (but not deleting config
> > entries) or tempering with the config, knm would segfault at
> > shutdown because it creates a VPNConnection that has no _vpnService
> > set (no .name service file found). See [1] for a backtrace and the
> > attached patch for a fix.
..
> Looks good, both commited.

You fixed the segfault yourself two days before. So you can either 
revert my first patch or your fix from before [1], because now 
(_vpnService == NULL) is checked twice.

/me should look into svn better before.

Robert


[1] 
$ svn diff -r705663:705664
Index: src/knetworkmanager-vpn.cpp
===================================================================
--- src/knetworkmanager-vpn.cpp (Revision 705663)
+++ src/knetworkmanager-vpn.cpp (Revision 705664)
@@ -289,7 +289,8 @@
        {
                // write attribs to configfile
                _cfgGrp->writeEntry("name", _name);
-               _cfgGrp->writeEntry("service_name", 
_vpnService->getName());
+               if (_vpnService)
+                       _cfgGrp->writeEntry("service_name", 
_vpnService->getName());
                _cfgGrp->writeEntry("routes", _routes);
                _cfgGrp->writeEntry("vpn_data", _data);
                //_cfgGrp->sync();

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-networkmanager/attachments/20070831/63986d4f/attachment.pgp 


More information about the kde-networkmanager mailing list