summaryrefslogtreecommitdiff
path: root/library/networkinterface.cpp
Side-by-side diff
Diffstat (limited to 'library/networkinterface.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/networkinterface.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/library/networkinterface.cpp b/library/networkinterface.cpp
index 56a0e5b..2b5c77e 100644
--- a/library/networkinterface.cpp
+++ b/library/networkinterface.cpp
@@ -1,20 +1,20 @@
/**********************************************************************
-** Copyright (C) 2000 Trolltech AS. All rights reserved.
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
-** This file is part of Qtopia Environment.
+** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
@@ -32,33 +32,35 @@ bool NetworkInterface::isActive( Config& cfg ) const
{
QString dev = device(cfg);
if ( dev.isEmpty() )
return FALSE;
QString dev0 = dev+'0';
FILE* f;
f = fopen("/proc/net/dev", "r");
if ( f ) {
char line[1024];
char devname[80];
while ( fgets( line, 1024, f ) ) {
if ( sscanf(line," %[^:]:", devname)==1 )
{
if ( devname == dev || devname == dev0 ) {
fclose(f);
+#ifdef QWS
Network::writeProxySettings( cfg );
+#endif
return TRUE;
}
}
}
fclose(f);
}
return FALSE;
}
QString NetworkInterface::cardType( Config& cfg ) const
{
return cfg.readEntry("CardType");
}
bool NetworkInterface::isAvailable( Config& cfg ) const
{