Cleanup output clutter.

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

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

@ -62,11 +62,11 @@ kdemain (int argc, char* argv[])
app.disableSessionManagement(); app.disableSessionManagement();
if (!TDEGlobal::hardwareDevices()) { 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; return -1;
} }
if (!TDEGlobal::networkManager()) { 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; return -1;
} }

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

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

@ -129,7 +129,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");
// Quit the dialog // Quit the dialog
TQDialog::done(1); TQDialog::done(1);

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

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

@ -98,7 +98,7 @@ void VPNTrayComponent::addMenuItems(TDEPopupMenu* menu)
any_vpn_found = 1; any_vpn_found = 1;
if (vpn_found == 1) { if (vpn_found == 1) {
printf("Active VPN connection found\n\r"); printf("Active VPN connection found\n");
} }
else { else {
popup->insertItem(SmallIcon ("encrypted", TQIconSet::Automatic), title, item, TQT_SLOT(slotActivate())); 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() 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());
FILE *file = fopen ( pcf_file.ascii(), "r" ); FILE *file = fopen ( pcf_file.ascii(), "r" );
if ( file != NULL ) { if ( file != NULL ) {
@ -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,14 +184,14 @@ 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 {
if (fgets(decrypted_result, 2048, pipe_decrypt) == NULL) { 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); pclose(pipe_decrypt);
for (i=0;i<2048;i++) { for (i=0;i<2048;i++) {
@ -200,7 +200,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));
} }
@ -210,7 +210,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!"));
} }
} }
@ -399,14 +399,14 @@ TDENetworkSettingsMap 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 {
if (fgets(decrypted_result, 2048, pipe_decrypt) == NULL) { 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); pclose(pipe_decrypt);
for (i=0;i<2048;i++) { for (i=0;i<2048;i++) {
@ -415,7 +415,7 @@ TDENetworkSettingsMap 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