File xosview-1.8.0-irda.patch of Package xosview

Index: linux/netmeter.cc
===================================================================
--- linux/netmeter.cc.orig
+++ linux/netmeter.cc
@@ -201,12 +201,22 @@ void NetMeter::checkeventNew(void)
                   ifs >> ig >> ig >> ig >> ig >> ig >> ig >> ig >> out;
                 }
 
-	      if (!ifs.eof())
+	      if (ifs.eof())
 		  {
-		  totin += in;
-		  totout += out;
+		  ifs.ignore(1024, '\n');
+		  break;
 		  }
 
+	      if (ifs.fail())
+		  {
+		  ifs.clear();
+		  ifs.ignore(1024, '\n');
+		  continue;
+		  }
+
+	      totin += in;
+	      totout += out;
+
 	      ifs.ignore(1024, '\n');
 	      }
 	}
openSUSE Build Service is sponsored by