Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > b2e3ac505bd14bf924e2c9becacc2082 > files > 6

kpowersave-0.7.2-16mdv2008.0.src.rpm

--- kpowersave-0.7.2/src/inactivity.cpp.orig	2007-06-22 10:20:32.000000000 -0400
+++ kpowersave-0.7.2/src/inactivity.cpp	2007-06-22 10:38:18.000000000 -0400
@@ -256,6 +256,7 @@ void inactivity::checkBlacklisted(){
 	if (!proc->start(KProcess::NotifyOnExit, KProcess::AllOutput))
 	{
 		delete proc;
+		proc = NULL;
 		emit displayErrorMsg(i18n("Could not start 'pidof'. "
 					  "Could not autosuspend the machine.\n"
 					  "Please check your installation."));
@@ -270,14 +271,14 @@ void inactivity::checkBlacklisted(){
 /*!
  * \b SLOT to get the return of the command pidof and parse this to set
  * \ref blacklisted_running .
- * \param *proc     pointer to the sending KProcess
+ * \param *p     pointer to the sending KProcess
  * \param *buffer   the char pointer to the output of the process to stdout
  * \param *lenght   the length of the buffer
  */
-void inactivity::getPIDs(KProcess *proc, char *buffer, int lenght) {
+void inactivity::getPIDs(KProcess *p, char *buffer, int lenght) {
 	myDebug ("inactivity::getPIDs");	
 
-	if( proc == NULL || lenght == 0 ) ; // to prevent compiler warning
+	if( p == NULL || lenght == 0 ) ; // to prevent compiler warning
 
 	QString pids(buffer);
 	pids.remove(" ");
@@ -302,21 +303,21 @@ void inactivity::getPIDs(KProcess *proc,
 
 /*!
  * \b SLOT which called if the call of pidof is exited
- * \param proc the KPocess which called this SLOT
+ * \param p the KProcess which called this SLOT
  */
-void inactivity::getPIDsExited(KProcess *proc){
+void inactivity::getPIDsExited(KProcess *p){
 	myDebug ("inactivity::getPIDsExited");
 
 	pidof_call_returned = true;
 	pidof_call_started = false;
 	
 	
-	if (proc->normalExit()){
+	if (p->normalExit()){
 		// if returned some pids or if pid returned nothing
-		if (proc->exitStatus() == 1 || proc->exitStatus() == 0){
+		if (p->exitStatus() == 1 || p->exitStatus() == 0){
 			pidof_call_failed = false;
 			delete proc;
-			proc=NULL;
+			proc = NULL;
 			return;
 		}
 	}