[PC-BSD Commits] r5794 - pcbsd/trunk/pcbsd-netmanager/src/NetworkTray

svn at pcbsd.org svn at pcbsd.org
Wed Jan 6 10:39:11 PST 2010


Author: kris
Date: 2010-01-06 10:39:11 -0800 (Wed, 06 Jan 2010)
New Revision: 5794

Modified:
   pcbsd/trunk/pcbsd-netmanager/src/NetworkTray/NetworkTray.cpp
Log:

Added debugging info to network tray



Modified: pcbsd/trunk/pcbsd-netmanager/src/NetworkTray/NetworkTray.cpp
===================================================================
--- pcbsd/trunk/pcbsd-netmanager/src/NetworkTray/NetworkTray.cpp	2010-01-06 18:28:52 UTC (rev 5793)
+++ pcbsd/trunk/pcbsd-netmanager/src/NetworkTray/NetworkTray.cpp	2010-01-06 18:39:11 UTC (rev 5794)
@@ -23,7 +23,7 @@
 
 
 /* Update interval in ms */
-#define  UPDATE_MSEC 6000
+#define  UPDATE_MSEC 15000
 
 // Public Variables
 QString DeviceName;
@@ -336,6 +336,8 @@
   if ( ! testFile.exists() )
     exit(0);
 
+  qDebug() << "Starting Probe...\n";
+
   // Update the ifconfig output of this device
   updateIfStatus(DeviceName);
 
@@ -423,6 +425,7 @@
   }
 
   // Set the tray icon now
+  qDebug() << "Updating Icon...\n";
   setIcon(Icon);
 
 
@@ -434,6 +437,8 @@
     close(0);
 
   QTimer::singleShot(UPDATE_MSEC,  this,  SLOT(monitorStatus()));
+
+  qDebug() << "Probe Done...\n";
 }
 
 // If the user wants to restart the network, do so
@@ -566,10 +571,10 @@
 {
    QProcess *getIfProc = new QProcess();
    getIfProc->start(QString("ifconfig"), QStringList() << ident);
-   if (getIfProc->waitForFinished()) {
+   if (getIfProc->waitForFinished(2000)) {
      ifconfigOutput.clear();
      ifconfigOutput = getIfProc->readAllStandardOutput().simplified();
    }
-   //qDebug() << "ifconfig output: " << ifconfigOutput <<"\n";
+   qDebug() << "ifconfig output: " << ifconfigOutput <<"\n";
    getIfProc->kill();
 }



More information about the Commits mailing list