summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index b4b59c3..0385cb1 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -137,64 +137,65 @@ namespace OpieTooth {
HciConfWrapper *hciconf = new HciConfWrapper( "/tmp/hcid.conf" );
hciconf->setPinHelper( "/bin/QtPalmtop/bin/blue-pin" );
// hciconf->setPinHelper( "/bin/QtPalmtop/bin/blue-pin" );
hciconf->setName( deviceName );
if ( useEncryption == 1) {
hciconf->setEncrypt( true );
} else {
hciconf->setEncrypt( false );
}
if ( enableAuthentification == 1) {
hciconf->setAuth( true );
} else {
hciconf->setAuth( false );
}
if ( enablePagescan == 1) {
hciconf->setPscan( true );
} else {
hciconf->setPscan( false );
}
if ( enableInquiryscan == 1) {
hciconf->setIscan( true );
} else {
hciconf->setIscan( false );
}
+ delete hciconf;
}
/**
* Read the list of allready known devices
*
*/
void BlueBase::readSavedDevices() {
QList<RemoteDevice> *loadedDevices = new QList<RemoteDevice>;
QDir deviceListSave( QDir::homeDirPath() + "/Settings/bluetooth/");
// list of .conf files
QStringList devicesFileList = deviceListSave.entryList();
// cut .conf of to get the mac and also read the name entry in it.
for ( QStringList::Iterator it = devicesFileList.begin(); it != devicesFileList.end(); ++it ) {
QString name;
QString mac;
qDebug((*it).latin1() );
Config conf((*it));
conf.setGroup("Info");
name = conf.readEntry("name", "Error");
qDebug("MAC: " + mac);
qDebug("NAME: " + name);
RemoteDevice currentDevice = RemoteDevice( mac , name );
loadedDevices->append( &currentDevice );
}
addSearchedDevices( *loadedDevices );
}