Cleanup output clutter.

(cherry picked from commit 4de9878790)
v3.5.13-sru
Darrell Anderson 12 years ago committed by Slávek Banko
parent 238af9e8f4
commit 6fdf47b00c

@ -171,7 +171,7 @@ Connection::isValid() const
void void
Connection::slotSecretsNeeded(const TQString& setting_name, const TQStringList& hints, bool request_new) Connection::slotSecretsNeeded(const TQString& setting_name, const TQStringList& hints, bool request_new)
{ {
printf("Connection::slotSecretsNeeded %s, new: %s\n\r", setting_name.ascii(), (request_new ? "yes" : "no")); printf("Connection::slotSecretsNeeded %s, new: %s\n", setting_name.ascii(), (request_new ? "yes" : "no"));
kdDebug() << "Connection::slotSecretsNeeded " << setting_name.ascii() << ", new: " << (request_new ? "yes" : "no") << endl; kdDebug() << "Connection::slotSecretsNeeded " << setting_name.ascii() << ", new: " << (request_new ? "yes" : "no") << endl;
ConnectionSetting* setting = getSetting(setting_name); ConnectionSetting* setting = getSetting(setting_name);

@ -201,7 +201,7 @@ ConnectionSecretsDBus::SendGetSecretsReply(ConnectionSettings::ConnectionSetting
void void
ConnectionSecretsDBus::GetSecretsAsync(int id, const TQString& setting_name, const TQStringList& hints, bool request_new) ConnectionSecretsDBus::GetSecretsAsync(int id, const TQString& setting_name, const TQStringList& hints, bool request_new)
{ {
printf("Connection::GetSecretsAsync for setting %s, %s\n\r", setting_name.ascii(), id); printf("Connection::GetSecretsAsync for setting %s, %s\n", setting_name.ascii(), id);
kdDebug() << "Connection::GetSecretsAsync for setting " << setting_name.ascii() << ", " << id << endl; kdDebug() << "Connection::GetSecretsAsync for setting " << setting_name.ascii() << ", " << id << endl;
d->currentRequest = id; d->currentRequest = id;
emit SecretsNeeded(setting_name, hints, request_new); emit SecretsNeeded(setting_name, hints, request_new);

@ -105,7 +105,7 @@ Device* DeviceStore::createDevice(const TQT_DBusObjectPath &obj_path)
dev->setConnection(TQT_DBusConnection::systemBus()); dev->setConnection(TQT_DBusConnection::systemBus());
TQ_UINT32 type = dev->getDeviceType(err); TQ_UINT32 type = dev->getDeviceType(err);
//printf("Device obj_path: %s\n\r", obj_path->data()); //printf("Device obj_path: %s\n", obj_path->data());
// FIXME: This should not be hardcoded, it would be better if wireless, wired etc. modules register their device type // FIXME: This should not be hardcoded, it would be better if wireless, wired etc. modules register their device type
// select the right device type and create the appropriate objects // select the right device type and create the appropriate objects

@ -93,7 +93,7 @@ void NetworkMenuItem::slotActivate()
if (nm) if (nm)
{ {
kdDebug() << "Activate Connection " << d->conn->getObjectPath().data() << " on Device " << d->dev->getObjectPath().ascii() << endl; kdDebug() << "Activate Connection " << d->conn->getObjectPath().data() << " on Device " << d->dev->getObjectPath().ascii() << endl;
printf("Activate Connection %s on Device %s\n\r", d->conn->getObjectPath().data(), d->dev->getObjectPath().ascii()); printf("Activate Connection %s on Device %s\n", d->conn->getObjectPath().data(), d->dev->getObjectPath().ascii());
#if NM_CHECK_VERSION(0,8,992) #if NM_CHECK_VERSION(0,8,992)
if (nm->ActivateConnectionAsync(id, "org.freedesktop.NetworkManagerUserSettings", d->conn->getObjectPath(), TQT_DBusObjectPath(QCString(d->dev->getObjectPath())), d->conn->getObjectPath(), err)) if (nm->ActivateConnectionAsync(id, "org.freedesktop.NetworkManagerUserSettings", d->conn->getObjectPath(), TQT_DBusObjectPath(QCString(d->dev->getObjectPath())), d->conn->getObjectPath(), err))
@ -110,7 +110,7 @@ void NetworkMenuItem::slotActivate()
else if (d->conn) else if (d->conn)
{ {
// no device given, just take the default device // no device given, just take the default device
printf("Activate Connection %s on default device\n\r", d->conn->getObjectPath().data()); printf("Activate Connection %s on default device\n", d->conn->getObjectPath().data());
TQT_DBusObjectPath act_conn = nm->getDefaultActiveConnection(); TQT_DBusObjectPath act_conn = nm->getDefaultActiveConnection();
TQT_DBusObjectPath device = nm->getDeviceForActiveConnection(act_conn); TQT_DBusObjectPath device = nm->getDeviceForActiveConnection(act_conn);
vpn_attempt_this_conn = d->conn->getObjectPath(); vpn_attempt_this_conn = d->conn->getObjectPath();

@ -336,7 +336,7 @@ Storage::saveConnections()
{ {
kdDebug() << k_funcinfo << endl; kdDebug() << k_funcinfo << endl;
kdDebug() << "Storage::saveConnections" << endl; kdDebug() << "Storage::saveConnections" << endl;
printf("Storage::saveConnections\n\r"); printf("Storage::saveConnections\n");
// write all connections we get from the connection-store to disk // write all connections we get from the connection-store to disk
ConnectionStore* store = ConnectionStore::getInstance(); ConnectionStore* store = ConnectionStore::getInstance();
TQValueList<ConnectionSettings::Connection*> connections = store->getConnections(); TQValueList<ConnectionSettings::Connection*> connections = store->getConnections();
@ -471,7 +471,7 @@ Storage::saveConnectionSecrets(Connection* conn, ConnectionSetting* setting, TQS
} }
} }
} }
printf("Secrets storage requested: %d\n\r", storage_requested); printf("Secrets storage requested: %d\n", storage_requested);
// get a group for this setting // get a group for this setting
setting_grp = TQString("ConnectionSecrets_%1_%2").arg(id).arg(type); setting_grp = TQString("ConnectionSecrets_%1_%2").arg(id).arg(type);
@ -577,7 +577,7 @@ Storage::restoreVPNSecrets(Connection* connection, ConnectionSetting* setting)
TQString id = connection->getID(); TQString id = connection->getID();
TQString type = setting->getType(); TQString type = setting->getType();
printf("Storage::restoreVPNSecrets\n\r"); printf("Storage::restoreVPNSecrets\n");
kdDebug() << "Storage::restoreVPNSecrets" << endl; kdDebug() << "Storage::restoreVPNSecrets" << endl;
// ID is necessary // ID is necessary
if (id.isEmpty()) if (id.isEmpty())

@ -229,7 +229,7 @@ void Tray::slotOnlineMode()
void Tray::slotNewVPNConnection() void Tray::slotNewVPNConnection()
{ {
printf("Creating new VPN connection\n\r"); printf("Creating new VPN connection\n");
// create a new VPN connection // create a new VPN connection
Connection* conn = new VPNConnection(); Connection* conn = new VPNConnection();
@ -410,7 +410,7 @@ Tray::slotStateChanged(TQ_UINT32 state)
setPixmap (loadIcon ("knetworkmanager")); setPixmap (loadIcon ("knetworkmanager"));
break; break;
} }
printf("NM state: %d\n\r", nm_state); printf("NM state: %d\n", nm_state);
} }
void void
@ -443,7 +443,7 @@ Tray::slotVPNSecretsNeeded(ConnectionSettings::Connection* connection, Connectio
Storage* storage = Storage::getInstance(); Storage* storage = Storage::getInstance();
bool hasSecretsStored = storage->hasSecretsStored(connection, setting); bool hasSecretsStored = storage->hasSecretsStored(connection, setting);
printf("Tray::slotVPNSecretsNeeded\n\r"); printf("Tray::slotVPNSecretsNeeded\n");
kdDebug() << "Tray::slotVPNSecretsNeeded" << endl; kdDebug() << "Tray::slotVPNSecretsNeeded" << endl;
// default secrets handling for all other connection types // default secrets handling for all other connection types
@ -454,7 +454,7 @@ Tray::slotVPNSecretsNeeded(ConnectionSettings::Connection* connection, Connectio
//if (hasSecretsStored && (!request_new)) //if (hasSecretsStored && (!request_new))
if (hasSecretsStored) if (hasSecretsStored)
{ {
printf("Tray::slotVPNSecretsNeeded: Restoring saved secrets\n\r"); printf("Tray::slotVPNSecretsNeeded: Restoring saved secrets\n");
// We have secrets stored, restore them // We have secrets stored, restore them
// if (storage->restoreVPNSecrets(connection, setting)) // if (storage->restoreVPNSecrets(connection, setting))
// { // {
@ -463,17 +463,17 @@ Tray::slotVPNSecretsNeeded(ConnectionSettings::Connection* connection, Connectio
TQString id = connection->getID(); TQString id = connection->getID();
TQString type = setting->getType(); TQString type = setting->getType();
printf("restoreVPNSecrets\n\r"); printf("restoreVPNSecrets\n");
// ID is necessary // ID is necessary
if (id.isEmpty()) { if (id.isEmpty()) {
printf("VPN connection ID is empty!\n\r"); printf("VPN connection ID is empty!\n");
} }
else { else {
// Get a group for this setting // Get a group for this setting
TQString setting_grp = TQString("ConnectionSecrets_%1_%2").arg(id).arg(type); TQString setting_grp = TQString("ConnectionSecrets_%1_%2").arg(id).arg(type);
// Restore the settings // Restore the settings
printf("Restoring VPN secret: %s\n\r", setting_grp.ascii()); printf("Restoring VPN secret: %s\n", setting_grp.ascii());
KConfigGroup secrets_grp(KGlobal::config(), setting_grp); KConfigGroup secrets_grp(KGlobal::config(), setting_grp);
TQMap<TQString, TQString> config_map = KGlobal::config()->entryMap(setting_grp); TQMap<TQString, TQString> config_map = KGlobal::config()->entryMap(setting_grp);
@ -483,7 +483,7 @@ Tray::slotVPNSecretsNeeded(ConnectionSettings::Connection* connection, Connectio
// ConnectionSetting* setting = conn->getSetting(typetwo); // ConnectionSetting* setting = conn->getSetting(typetwo);
// if (!setting) // if (!setting)
// { // {
// printf("Secrets cannot be restored!\n\r"); // printf("Secrets cannot be restored!\n");
// } // }
// Read the SettingsMap from kconfig // Read the SettingsMap from kconfig
@ -502,12 +502,12 @@ Tray::slotVPNSecretsNeeded(ConnectionSettings::Connection* connection, Connectio
// Remove the annoying XML <string> stuff // Remove the annoying XML <string> stuff
xmldata.replace("<string>", ""); xmldata.replace("<string>", "");
xmldata.replace("</string>", ""); xmldata.replace("</string>", "");
//printf("Got %s with value %s\n\r", key.ascii(), xmldata.ascii()); //printf("Got %s with value %s\n", key.ascii(), xmldata.ascii());
map.insert(key, xmldata); map.insert(key, xmldata);
number_of_secrets_found++; number_of_secrets_found++;
} }
if (number_of_secrets_found > 0) { if (number_of_secrets_found > 0) {
printf("Got secrets from file, continuing...\n\r"); printf("Got secrets from file, continuing...\n");
// Good, we have new secrets now, update the settings // Good, we have new secrets now, update the settings
//map = _vpnAuthWidget->getPasswords(); //map = _vpnAuthWidget->getPasswords();
@ -527,7 +527,7 @@ Tray::slotVPNSecretsNeeded(ConnectionSettings::Connection* connection, Connectio
conn->slotSecretsProvided(prop); conn->slotSecretsProvided(prop);
} }
else { else {
printf("Tray::slotVPNSecretsNeeded: New secrets requested\n\r"); printf("Tray::slotVPNSecretsNeeded: New secrets requested\n");
// OK, NM requests new secrets...do something! // OK, NM requests new secrets...do something!
ConnectionSettings::VPNConnection* conn = dynamic_cast<ConnectionSettings::VPNConnection*>(connection); ConnectionSettings::VPNConnection* conn = dynamic_cast<ConnectionSettings::VPNConnection*>(connection);
VPNAuthenticationDialog* auth = new VPNAuthenticationDialog(conn, this, "vpnauth"); VPNAuthenticationDialog* auth = new VPNAuthenticationDialog(conn, this, "vpnauth");
@ -540,7 +540,7 @@ Tray::slotVPNSecretsNeeded(ConnectionSettings::Connection* connection, Connectio
passdata.remove("\r"); passdata.remove("\r");
passdata.remove("\n"); passdata.remove("\n");
passdata.remove("\t"); passdata.remove("\t");
//printf("Trying to set %s to value %s\n\r", it.key().ascii(), passdata.ascii()); //printf("Trying to set %s to value %s\n", it.key().ascii(), passdata.ascii());
auth->setPasswords(it.key(), passdata); auth->setPasswords(it.key(), passdata);
} }
auth->show(); auth->show();
@ -549,7 +549,7 @@ Tray::slotVPNSecretsNeeded(ConnectionSettings::Connection* connection, Connectio
//connection->slotSecretsProvided(setting); //connection->slotSecretsProvided(setting);
} }
else { else {
printf("Tray::slotVPNSecretsNeeded: New secrets needed\n\r"); printf("Tray::slotVPNSecretsNeeded: New secrets needed\n");
// OK, NM needs new secrets...do something! // OK, NM needs new secrets...do something!
ConnectionSettings::VPNConnection* conn = dynamic_cast<ConnectionSettings::VPNConnection*>(connection); ConnectionSettings::VPNConnection* conn = dynamic_cast<ConnectionSettings::VPNConnection*>(connection);
VPNAuthenticationDialog* auth = new VPNAuthenticationDialog(conn, this, "vpnauth"); VPNAuthenticationDialog* auth = new VPNAuthenticationDialog(conn, this, "vpnauth");
@ -560,7 +560,7 @@ Tray::slotVPNSecretsNeeded(ConnectionSettings::Connection* connection, Connectio
} }
else else
{ {
printf("Tray::slotVPNSecretsNeeded: New secrets needed\n\r"); printf("Tray::slotVPNSecretsNeeded: New secrets needed\n");
// OK, NM needs new secrets...do something! // OK, NM needs new secrets...do something!
ConnectionSettings::VPNConnection* conn = dynamic_cast<ConnectionSettings::VPNConnection*>(connection); ConnectionSettings::VPNConnection* conn = dynamic_cast<ConnectionSettings::VPNConnection*>(connection);
VPNAuthenticationDialog* auth = new VPNAuthenticationDialog(conn, this, "vpnauth"); VPNAuthenticationDialog* auth = new VPNAuthenticationDialog(conn, this, "vpnauth");
@ -578,7 +578,7 @@ Tray::slotSecretsNeeded(ConnectionSettings::Connection* connection, ConnectionSe
if (connection->getType() == NM_SETTING_VPN_SETTING_NAME) if (connection->getType() == NM_SETTING_VPN_SETTING_NAME)
{ {
if (vpn_new_credentials_needed == 1) { if (vpn_new_credentials_needed == 1) {
printf("VPN connection failed with bad credentials\n\r"); printf("VPN connection failed with bad credentials\n");
vpn_new_credentials_needed = 0; vpn_new_credentials_needed = 0;
request_new = 1; request_new = 1;
} }
@ -897,7 +897,7 @@ void Tray::updateTrayIcon(NMDeviceState state)
} }
// if (found_any_active_connection == 1) { // if (found_any_active_connection == 1) {
// printf("Active connection found\n\r"); // printf("Active connection found\n");
// } // }
if ((current_vpn_state == NM_VPN_CONNECTION_STATE_FAILED) || (current_vpn_state == NM_VPN_CONNECTION_STATE_DISCONNECTED)) { if ((current_vpn_state == NM_VPN_CONNECTION_STATE_FAILED) || (current_vpn_state == NM_VPN_CONNECTION_STATE_DISCONNECTED)) {
@ -940,8 +940,8 @@ void Tray::updateTrayIcon(NMDeviceState state)
} }
} }
else { else {
printf("VPN state: %d\n\r", current_vpn_state); printf("VPN state: %d\n", current_vpn_state);
//printf("Activated is: %d\n\r", NM_VPN_CONNECTION_STATE_ACTIVATED); //printf("Activated is: %d\n", NM_VPN_CONNECTION_STATE_ACTIVATED);
// stop the old movie to avoid unnecessary wakups // stop the old movie to avoid unnecessary wakups
DeviceTrayComponent * dtc = d->foregroundTrayComponent; DeviceTrayComponent * dtc = d->foregroundTrayComponent;
@ -976,7 +976,7 @@ void Tray::updateTrayIcon(NMDeviceState state)
} }
nm_device_state_global = state; nm_device_state_global = state;
//printf("Device state: %d\n\r", nm_device_state_global); //printf("Device state: %d\n", nm_device_state_global);
} }
void Tray::updateActiveConnection(NMDeviceState state) void Tray::updateActiveConnection(NMDeviceState state)
@ -1010,7 +1010,7 @@ void Tray::slotDeviceRemovedNotify(Device* dev)
void Tray::slotVPNBannerShow(const TQString& vpnbanner) void Tray::slotVPNBannerShow(const TQString& vpnbanner)
{ {
printf("VPN banner: %s\n\r", vpnbanner.ascii()); printf("VPN banner: %s\n", vpnbanner.ascii());
KNotifyClient::event(winId(), "knm-nm-vpn-banner", vpnbanner); KNotifyClient::event(winId(), "knm-nm-vpn-banner", vpnbanner);
} }

@ -88,11 +88,11 @@ void VPNDBUSPlugin::slotLoginBanner(const TQString& banner)
void VPNDBUSPlugin::slotFailure(TQ_UINT32 failure_reason) void VPNDBUSPlugin::slotFailure(TQ_UINT32 failure_reason)
{ {
printf("VPN failure code %d\n\r", failure_reason); printf("VPN failure code %d\n", failure_reason);
if ((failure_reason == 0) || (failure_reason == 1) || (failure_reason == 2)) { if ((failure_reason == 0) || (failure_reason == 1) || (failure_reason == 2)) {
// Try to connect again using cached information; request new login though // Try to connect again using cached information; request new login though
printf("Reactivate VPN connection on default device\n\r"); printf("Reactivate VPN connection on default device\n");
vpn_new_credentials_needed = 1; vpn_new_credentials_needed = 1;
int id; int id;
TQT_DBusError err; TQT_DBusError err;

@ -167,7 +167,7 @@ void VPNAuthenticationDialog::cancel()
emit done (true, x, false, false); emit done (true, x, false, false);
TQDialog::done(1);*/ TQDialog::done(1);*/
printf("Attempting to deactivate VPN connection...\n\r"); printf("Attempting to deactivate VPN connection...\n");
// Disconnect the attempted connection // Disconnect the attempted connection
_conn->slotSecretsError(); _conn->slotSecretsError();

@ -141,7 +141,7 @@ WirelessConnection* WirelessDeviceTray::findMatchingConnection(const WirelessNet
void WirelessDeviceTray::addWirelessNetworks(KPopupMenu* menu) void WirelessDeviceTray::addWirelessNetworks(KPopupMenu* menu)
{ {
printf("Updating wireless network list\n\r"); printf("Updating wireless network list\n");
// get all wireless networks // get all wireless networks
TQValueList<WirelessNetwork> nets = WirelessManager::getWirelessNetworks(d->dev); TQValueList<WirelessNetwork> nets = WirelessManager::getWirelessNetworks(d->dev);

@ -67,7 +67,7 @@ void WirelessNetworkItem::slotActivate()
NMProxy* nm = NMProxy::getInstance(); NMProxy* nm = NMProxy::getInstance();
int id; int id;
TQT_DBusError err; TQT_DBusError err;
printf("slotActivate\n\r"); printf("slotActivate\n");
if (_dev && nm) if (_dev && nm)
{ {
if ( _conn ) if ( _conn )
@ -84,7 +84,7 @@ void WirelessNetworkItem::slotActivate()
else else
{ {
// TODO: create new connection based upon the network and show the dialog // TODO: create new connection based upon the network and show the dialog
printf("New network support not implemented yet\n\r"); printf("New network support not implemented yet\n");
} }
} }
} }

@ -102,7 +102,7 @@ void VPNTrayComponent::addMenuItems(KPopupMenu* menu)
} }
if (vpn_found == 1) { if (vpn_found == 1) {
printf("Active VPN connection found\n\r"); printf("Active VPN connection found\n");
} }
else { else {
int id = popup->insertItem(SmallIcon ("encrypted", TQIconSet::Automatic), title, item, TQT_SLOT(slotActivate())); int id = popup->insertItem(SmallIcon ("encrypted", TQIconSet::Automatic), title, item, TQT_SLOT(slotActivate()));

@ -138,7 +138,7 @@ int VPNCConfig::getFileConfig(char *parameter, char *line) {
void VPNCConfig::pcfImport() void VPNCConfig::pcfImport()
{ {
const TQString& pcf_file = TQString(_vpncWidget->editPCF->url()); const TQString& pcf_file = TQString(_vpncWidget->editPCF->url());
printf("Asked for PCF import from file %s\n\r", pcf_file.ascii()); printf("Asked for PCF import from file %s\n", pcf_file.ascii());
int i; int i;
FILE *file = fopen ( pcf_file.ascii(), "r" ); FILE *file = fopen ( pcf_file.ascii(), "r" );
@ -149,33 +149,33 @@ void VPNCConfig::pcfImport()
// Parse the line and update global variables (current line in variable "line") // Parse the line and update global variables (current line in variable "line")
if (getFileConfig("Host=", line) == 0) { if (getFileConfig("Host=", line) == 0) {
//strdup(linedata) //strdup(linedata)
printf("Got configuration parameter Host with data %s\n\r", linedata); printf("Got configuration parameter Host with data %s\n", linedata);
_vpncWidget->IPSec_gateway->setText(linedata); _vpncWidget->IPSec_gateway->setText(linedata);
} }
if (getFileConfig("GroupName=", line) == 0) { if (getFileConfig("GroupName=", line) == 0) {
printf("Got configuration parameter GroupName with data %s\n\r", linedata); printf("Got configuration parameter GroupName with data %s\n", linedata);
_vpncWidget->IPSec_ID->setText(linedata); _vpncWidget->IPSec_ID->setText(linedata);
} }
// if (getFileConfig("TcpTunnelingPort=", line) == 0) { // if (getFileConfig("TcpTunnelingPort=", line) == 0) {
// printf("Got configuration parameter TcpTunnelingPort with data %s\n\r", linedata); // printf("Got configuration parameter TcpTunnelingPort with data %s\n", linedata);
// _vpncWidget->IPSec_ID->setText(linedata); // _vpncWidget->IPSec_ID->setText(linedata);
// } // }
if (getFileConfig("NTDomain=", line) == 0) { if (getFileConfig("NTDomain=", line) == 0) {
if (strlen(linedata) > 0) { if (strlen(linedata) > 0) {
printf("Got configuration parameter NTDomain with data %s\n\r", linedata); printf("Got configuration parameter NTDomain with data %s\n", linedata);
_vpncWidget->Domain->setText(linedata); _vpncWidget->Domain->setText(linedata);
_vpncWidget->chkUseDomain->setChecked(true); _vpncWidget->chkUseDomain->setChecked(true);
} }
} }
if (getFileConfig("GroupPwd=", line) == 0) { if (getFileConfig("GroupPwd=", line) == 0) {
if (strlen(linedata) > 0) { if (strlen(linedata) > 0) {
printf("Got configuration parameter GroupPwd with data %s\n\r", linedata); printf("Got configuration parameter GroupPwd with data %s\n", linedata);
KMessageBox::information(this, TQString("Your group password is: %1\n\r\n\rYou will need this information when you log on").arg(linedata)); KMessageBox::information(this, TQString("Your group password is: %1\n\r\n\rYou will need this information when you log on").arg(linedata));
} }
} }
if (getFileConfig("enc_GroupPwd=", line) == 0) { if (getFileConfig("enc_GroupPwd=", line) == 0) {
if (strlen(linedata) > 0) { if (strlen(linedata) > 0) {
printf("Got configuration parameter enc_GroupPwd with data %s\n\r", linedata); printf("Got configuration parameter enc_GroupPwd with data %s\n", linedata);
// Decrypt the obfusticated password with /usr/lib/vpnc/cisco-decrypt // Decrypt the obfusticated password with /usr/lib/vpnc/cisco-decrypt
string decryptcommand="/usr/lib/vpnc/cisco-decrypt "; string decryptcommand="/usr/lib/vpnc/cisco-decrypt ";
@ -184,10 +184,10 @@ void VPNCConfig::pcfImport()
int i; int i;
decryptcommand.append(linedata); decryptcommand.append(linedata);
printf("Group password decrypt command: %s\n\r", decryptcommand.c_str()); printf("Group password decrypt command: %s\n", decryptcommand.c_str());
if ((pipe_decrypt = popen(decryptcommand.c_str(), "r")) == NULL) if ((pipe_decrypt = popen(decryptcommand.c_str(), "r")) == NULL)
{ {
printf("Group password decrypt error\n\r"); printf("Group password decrypt error\n");
} }
else { else {
fgets(decrypted_result, 2048, pipe_decrypt); fgets(decrypted_result, 2048, pipe_decrypt);
@ -198,7 +198,7 @@ void VPNCConfig::pcfImport()
i=2048; i=2048;
} }
} }
printf("Group password decrypt result: '%s'\n\r", decrypted_result); printf("Group password decrypt result: '%s'\n", decrypted_result);
} }
KMessageBox::information(this, TQString("Your group password is: %1\n\r\n\rYou will need this information when you log on").arg(decrypted_result)); KMessageBox::information(this, TQString("Your group password is: %1\n\r\n\rYou will need this information when you log on").arg(decrypted_result));
} }
@ -208,7 +208,7 @@ void VPNCConfig::pcfImport()
} }
else else
{ {
//printf("[WARN] Unable to open configuration file %s\n\r", pcf_file.ascii()); //printf("[WARN] Unable to open configuration file %s\n", pcf_file.ascii());
KMessageBox::error(this, i18n("That configuration file does not exist!")); KMessageBox::error(this, i18n("That configuration file does not exist!"));
} }
} }
@ -366,10 +366,10 @@ TQMap<TQString, TQString> VPNCAuthentication::getPasswords()
int i; int i;
decryptcommand.append(_vpncAuth->editGroupPassword->password()); decryptcommand.append(_vpncAuth->editGroupPassword->password());
printf("Group password decrypt command: %s\n\r", decryptcommand.c_str()); printf("Group password decrypt command: %s\n", decryptcommand.c_str());
if ((pipe_decrypt = popen(decryptcommand.c_str(), "r")) == NULL) if ((pipe_decrypt = popen(decryptcommand.c_str(), "r")) == NULL)
{ {
printf("Group password decrypt error\n\r"); printf("Group password decrypt error\n");
} }
else { else {
fgets(decrypted_result, 2048, pipe_decrypt); fgets(decrypted_result, 2048, pipe_decrypt);
@ -380,7 +380,7 @@ TQMap<TQString, TQString> VPNCAuthentication::getPasswords()
i=2048; i=2048;
} }
} }
printf("Group password decrypt result: '%s'\n\r", decrypted_result); printf("Group password decrypt result: '%s'\n", decrypted_result);
pwds.insert("IPSec secret", TQString(decrypted_result)); pwds.insert("IPSec secret", TQString(decrypted_result));
} }
} }

Loading…
Cancel
Save