summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/pppmodule.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings/ppp/pppmodule.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/pppmodule.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp
index a7caffe..2291e8a 100644
--- a/noncore/settings/networksettings/ppp/pppmodule.cpp
+++ b/noncore/settings/networksettings/ppp/pppmodule.cpp
@@ -51,62 +51,62 @@ namespace
* an interface was up while closing the application
* we need to be able to shut it down...
*/
PPPModule::PPPModule() : Module()
{
InterfaceKeeper inFace;
QMap<QString,Connection> running = inFace.interfaces();
QStringList handledInterfaceNames;
QMap<QString,QString> ifaces = PPPData::getConfiguredInterfaces();
QMap<QString,QString>::Iterator it;
InterfacePPP *iface;
- qDebug("getting interfaces");
+ odebug << "getting interfaces" << oendl;
for( it = ifaces.begin(); it != ifaces.end(); ++it )
{
- qDebug("ifaces %s %s", it.key().latin1(), it.data().latin1() );
+ odebug << "ifaces " << it.key().latin1() << " " << it.data().latin1() << "" << oendl;
iface = new InterfacePPP( 0, it.key() );
iface->setHardwareName( it.data() );
list.append( (Interface*)iface );
// check if (*it) is one of the running ifaces
if ( running.contains( it.data() ) )
{
- qDebug("iface is running %s", it.key().latin1() );
+ odebug << "iface is running " << it.key().latin1() << "" << oendl;
handledInterfaceNames << running[it.data()].device;
iface->setStatus( true );
iface->setPPPDpid( running[it.data()].pid );
iface->modem()->setPPPDevice( running[it.data()].device );
iface->refresh();
}
}
setHandledInterfaceNames( handledInterfaceNames );
}
/**
* Delete any interfaces that we own.
*/
PPPModule::~PPPModule()
{
- qDebug("PPPModule::~PPPModule() " );
+ odebug << "PPPModule::~PPPModule() " << oendl;
QMap<QString,QString> ifaces;
InterfaceKeeper keeper;
Interface *i;
for ( i=list.first(); i != 0; i=list.next() )
{
/* if online save the state */
if ( i->getStatus() )
{
- qDebug("Iface %s is still up", i->getHardwareName().latin1() );
+ odebug << "Iface " << i->getHardwareName().latin1() << " is still up" << oendl;
InterfacePPP* ppp = static_cast<InterfacePPP*>(i);
keeper.addInterface( ppp->pppPID(), ppp->pppDev(), ppp->getHardwareName() );
}
ifaces.insert( i->getInterfaceName(), i->getHardwareName() );
delete i;
}
PPPData::setConfiguredInterfaces( ifaces );
}
/**
* Change the current profile
*/
@@ -132,25 +132,25 @@ QString PPPModule::getPixmapName(Interface* )
*/
bool PPPModule::isOwner(Interface *i)
{
return list.find( i ) != -1;
}
/**
* Create, and return the WLANConfigure Module
* @return QWidget* pointer to this modules configure.
*/
QWidget *PPPModule::configure(Interface *i)
{
- qDebug("return ModemWidget");
+ odebug << "return ModemWidget" << oendl;
PPPConfigWidget *pppconfig = new PPPConfigWidget( (InterfacePPP*)i,
0, "PPPConfig", false,
(Qt::WDestructiveClose | Qt::WStyle_ContextHelp));
return pppconfig;
}
/**
* Create, and return the Information Module
* @return QWidget* pointer to this modules info.
*/
QWidget *PPPModule::information(Interface *i)
{
@@ -159,25 +159,25 @@ QWidget *PPPModule::information(Interface *i)
return new InterfaceInformationPPP( 0, "InterfaceInformationPPP", i );
}
/**
* Get all active (up or down) interfaces
* @return QList<Interface> A list of interfaces that exsist that havn't
* been called by isOwner()
*/
QList<Interface> PPPModule::getInterfaces()
{
// List all of the files in the peer directory
- qDebug("PPPModule::getInterfaces");
+ odebug << "PPPModule::getInterfaces" << oendl;
return list;
}
/**
* Attempt to add a new interface as defined by name
* @param name the name of the type of interface that should be created given
* by possibleNewInterfaces();
* @return Interface* NULL if it was unable to be created.
*/
Interface *PPPModule::addNewInterface(const QString &newInterface)
{
@@ -252,32 +252,32 @@ namespace
QMap<QString, Connection> InterfaceKeeper::interfaces()const
{
Config cfg("ppp_plugin_keeper");
QMap<QString, Connection> ifaces;
QStringList lst = cfg.groupList();
for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
{
Connection con;
cfg.setGroup( (*it) );
con.name = (*it);
con.pid = cfg.readNumEntry("pid");
con.device = cfg.readEntry("device");
- qDebug(" %s %s %d", con.name.latin1(), con.device.latin1(), con.pid );
+ odebug << " " << con.name.latin1() << " " << con.device.latin1() << " " << con.pid << "" << oendl;
if ( con.pid != -1 && isAvailable( con.pid ) )
ifaces.insert( con.name, con );
}
return ifaces;
}
bool InterfaceKeeper::isAvailable( pid_t p)const
{
if (::kill(p, 0 ) == 0 || errno != ESRCH )
{
- qDebug("isAvailable %d", p);
+ odebug << "isAvailable " << p << "" << oendl;
return true;
}
- qDebug("notAvailable %d", p);
+ odebug << "notAvailable " << p << "" << oendl;
return false;
}
}