Cleanup output clutter.

pull/1/head
Darrell Anderson 12 years ago
parent b4b89eba15
commit 0dc62c7ad7

@ -219,7 +219,7 @@ void DeviceTrayComponent::deviceStateChanged(TDENetworkConnectionStatus::TDENetw
}
#ifdef DEBUG_STATE
printf("Device tray state: 0x%08x\n\r", newState);
printf("Device tray state: 0x%08x\n", newState);
#endif // DEBUG_STATE
//check if our device now holds the default active connection

@ -62,11 +62,11 @@ kdemain (int argc, char* argv[])
app.disableSessionManagement();
if (!TDEGlobal::hardwareDevices()) {
printf("[ERROR] Unable to load tdenetworkmanager due to invalid TDEGlobal::hardwareDevices() object\n\r"); fflush(stdout);
printf("[ERROR] Unable to load tdenetworkmanager due to invalid TDEGlobal::hardwareDevices() object\n"); fflush(stdout);
return -1;
}
if (!TDEGlobal::networkManager()) {
printf("[ERROR] Unable to load tdenetworkmanager due to invalid TDEGlobal::hardwareDevices() object\n\r"); fflush(stdout);
printf("[ERROR] Unable to load tdenetworkmanager due to invalid TDEGlobal::hardwareDevices() object\n"); fflush(stdout);
return -1;
}

@ -81,7 +81,7 @@ void NetworkMenuItem::slotActivate()
if (deviceConnMan)
{
kdDebug() << "Activate Connection " << conn->UUID.ascii() << " on Device " << dev->deviceNode().ascii() << endl;
printf("Activate Connection %s on Device %s\n\r", conn->UUID.ascii(), dev->deviceNode().ascii());
printf("Activate Connection %s on Device %s\n", conn->UUID.ascii(), dev->deviceNode().ascii());
TDENetworkConnectionStatus::TDENetworkConnectionStatus result = deviceConnMan->initiateConnection(conn->UUID);
// if ((result == TDENetworkConnectionStatus::Disconnected)
@ -96,7 +96,7 @@ void NetworkMenuItem::slotActivate()
else if (conn)
{
// no device given, just take the default device
printf("Activate Connection %s on default device\n\r", conn->UUID.ascii());
printf("Activate Connection %s on default device\n", conn->UUID.ascii());
TDENetworkConnectionStatus::TDENetworkConnectionStatus result = nm->initiateConnection(conn->UUID);
if ((result == TDENetworkConnectionStatus::Disconnected)

@ -387,7 +387,7 @@ Tray::slotStateChanged(TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlag
setBaseStateIcon(newState);
#ifdef DEBUG_STATE
printf("NM state: 0x%08x\n\r", newState);
printf("NM state: 0x%08x\n", newState);
#endif // DEBUG_STATE
showActiveDeviceTray();
@ -678,7 +678,7 @@ void Tray::slotUpdateDeviceState()
void Tray::slotUpdateDeviceState(TDENetworkConnectionStatus::TDENetworkConnectionStatus newState, TDENetworkConnectionStatus::TDENetworkConnectionStatus prevState, TQString hwAddress)
{
#ifdef DEBUG_STATE
printf("Device state: 0x%08x was: 0x%08x\n\r", newState, prevState);
printf("Device state: 0x%08x was: 0x%08x\n", newState, prevState);
#endif // DEBUG_STATE
if (newState != prevState) {
@ -786,7 +786,7 @@ void Tray::updateTrayIcon(TDENetworkConnectionStatus::TDENetworkConnectionStatus
#ifdef DEBUG_STATE
// if (found_any_active_connection == 1) {
// printf("Active connection found\n\r");
// printf("Active connection found\n");
// }
#endif // DEBUG_STATE
@ -840,8 +840,8 @@ void Tray::updateTrayIcon(TDENetworkConnectionStatus::TDENetworkConnectionStatus
else {
TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags current_vpn_state = (TDEGlobal::networkManager()->backendStatus() & TDENetworkGlobalManagerFlags::VPNMask);
#ifdef DEBUG_STATE
printf("VPN state: 0x%08x\n\r", current_vpn_state);
//printf("Activated is: %d\n\r", TDENetworkConnectionStatus::Connected);
printf("VPN state: 0x%08x\n", current_vpn_state);
//printf("Activated is: %d\n", TDENetworkConnectionStatus::Connected);
#endif // DEBUG_STATE
// stop the old movie to avoid unnecessary wakups
DeviceTrayComponent * dtc = d->foregroundTrayComponent;
@ -885,7 +885,7 @@ void Tray::updateTrayIcon(TDENetworkConnectionStatus::TDENetworkConnectionStatus
nm_device_state_global = state;
#ifdef DEBUG_STATE
//printf("Device state: 0x%08x\n\r", nm_device_state_global);
//printf("Device state: 0x%08x\n", nm_device_state_global);
#endif // DEBUG_STATE
}

@ -129,7 +129,7 @@ void VPNAuthenticationDialog::cancel()
emit done (true, x, false, false);
TQDialog::done(1);*/
printf("Attempting to deactivate VPN connection...\n\r");
printf("Attempting to deactivate VPN connection...\n");
// Quit the dialog
TQDialog::done(1);

@ -144,7 +144,7 @@ void WirelessDeviceTray::addWirelessNetworks(TDEPopupMenu* menu)
TDENetworkDevice* dev = dynamic_cast<TDENetworkDevice*>(hwdevices->findByUniqueID(d->dev));
#ifdef DEBUG_STATE
printf("Updating wireless network list\n\r");
printf("Updating wireless network list\n");
#endif // DEBUG_STATE
// get all wireless networks
@ -313,7 +313,7 @@ void WirelessDeviceTray::slotUpdateDeviceState(TDENetworkConnectionStatus::TDENe
}
#ifdef DEBUG_STATE
printf("Wireless state: 0x%08x\n\r", newState);
printf("Wireless state: 0x%08x\n", newState);
#endif // DEBUG_STATE
slotCheckActiveAccessPoint();

@ -62,7 +62,7 @@ void WirelessNetworkItem::slotActivate()
TDENetworkConnectionManager* deviceConnMan = dev->connectionManager();
printf("slotActivate\n\r");
printf("slotActivate\n");
if (_dev && deviceConnMan)
{
if ( conn )
@ -78,7 +78,7 @@ void WirelessNetworkItem::slotActivate()
else
{
// 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");
}
}
}

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

@ -139,7 +139,7 @@ int VPNCConfig::getFileConfig(const char *parameter, char *line) {
void VPNCConfig::pcfImport()
{
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());
FILE *file = fopen ( pcf_file.ascii(), "r" );
if ( file != NULL ) {
@ -149,33 +149,33 @@ void VPNCConfig::pcfImport()
// Parse the line and update global variables (current line in variable "line")
if (getFileConfig("Host=", line) == 0) {
//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);
}
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);
}
// 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);
// }
if (getFileConfig("NTDomain=", line) == 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->chkUseDomain->setChecked(true);
}
}
if (getFileConfig("GroupPwd=", line) == 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));
}
}
if (getFileConfig("enc_GroupPwd=", line) == 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
string decryptcommand="/usr/lib/vpnc/cisco-decrypt ";
@ -184,14 +184,14 @@ void VPNCConfig::pcfImport()
int i;
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)
{
printf("Group password decrypt error\n\r");
printf("Group password decrypt error\n");
}
else {
if (fgets(decrypted_result, 2048, pipe_decrypt) == NULL) {
printf("Error reading from decryption program\n\r");
printf("Error reading from decryption program\n");
}
pclose(pipe_decrypt);
for (i=0;i<2048;i++) {
@ -200,7 +200,7 @@ void VPNCConfig::pcfImport()
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));
}
@ -210,7 +210,7 @@ void VPNCConfig::pcfImport()
}
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!"));
}
}
@ -399,14 +399,14 @@ TDENetworkSettingsMap VPNCAuthentication::getPasswords()
int i;
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)
{
printf("Group password decrypt error\n\r");
printf("Group password decrypt error\n");
}
else {
if (fgets(decrypted_result, 2048, pipe_decrypt) == NULL) {
printf("Error reading from decryption program\n\r");
printf("Error reading from decryption program\n");
}
pclose(pipe_decrypt);
for (i=0;i<2048;i++) {
@ -415,7 +415,7 @@ TDENetworkSettingsMap VPNCAuthentication::getPasswords()
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));
}
}

Loading…
Cancel
Save